UNPKG

@cdktf/provider-azurerm

Version:

Prebuilt azurerm Provider for Terraform CDK (cdktf)

1,288 lines (1,287 loc) 213 kB
"use strict"; var _a, _b, _c, _d, _e, _f; Object.defineProperty(exports, "__esModule", { value: true }); exports.RedisCache = exports.RedisCacheTimeoutsOutputReference = exports.redisCacheTimeoutsToHclTerraform = exports.redisCacheTimeoutsToTerraform = exports.RedisCacheRedisConfigurationOutputReference = exports.redisCacheRedisConfigurationToHclTerraform = exports.redisCacheRedisConfigurationToTerraform = exports.RedisCachePatchScheduleList = exports.RedisCachePatchScheduleOutputReference = exports.redisCachePatchScheduleToHclTerraform = exports.redisCachePatchScheduleToTerraform = exports.RedisCacheIdentityOutputReference = exports.redisCacheIdentityToHclTerraform = exports.redisCacheIdentityToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function redisCacheIdentityToTerraform(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 { identity_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.identityIds), type: cdktf.stringToTerraform(struct.type), }; } exports.redisCacheIdentityToTerraform = redisCacheIdentityToTerraform; function redisCacheIdentityToHclTerraform(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 = { identity_ids: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.identityIds), isBlock: false, type: "set", storageClassType: "stringList", }, type: { value: cdktf.stringToHclTerraform(struct.type), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.redisCacheIdentityToHclTerraform = redisCacheIdentityToHclTerraform; class RedisCacheIdentityOutputReference 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._identityIds !== undefined) { hasAnyValues = true; internalValueResult.identityIds = this._identityIds; } if (this._type !== undefined) { hasAnyValues = true; internalValueResult.type = this._type; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._identityIds = undefined; this._type = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._identityIds = value.identityIds; this._type = value.type; } } get identityIds() { return cdktf.Fn.tolist(this.getListAttribute('identity_ids')); } set identityIds(value) { this._identityIds = value; } resetIdentityIds() { this._identityIds = undefined; } // Temporarily expose input value. Use with caution. get identityIdsInput() { return this._identityIds; } // principal_id - computed: true, optional: false, required: false get principalId() { return this.getStringAttribute('principal_id'); } // tenant_id - computed: true, optional: false, required: false get tenantId() { return this.getStringAttribute('tenant_id'); } get type() { return this.getStringAttribute('type'); } set type(value) { this._type = value; } // Temporarily expose input value. Use with caution. get typeInput() { return this._type; } } exports.RedisCacheIdentityOutputReference = RedisCacheIdentityOutputReference; _a = JSII_RTTI_SYMBOL_1; RedisCacheIdentityOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.redisCache.RedisCacheIdentityOutputReference", version: "12.27.0" }; function redisCachePatchScheduleToTerraform(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 { day_of_week: cdktf.stringToTerraform(struct.dayOfWeek), maintenance_window: cdktf.stringToTerraform(struct.maintenanceWindow), start_hour_utc: cdktf.numberToTerraform(struct.startHourUtc), }; } exports.redisCachePatchScheduleToTerraform = redisCachePatchScheduleToTerraform; function redisCachePatchScheduleToHclTerraform(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 = { day_of_week: { value: cdktf.stringToHclTerraform(struct.dayOfWeek), isBlock: false, type: "simple", storageClassType: "string", }, maintenance_window: { value: cdktf.stringToHclTerraform(struct.maintenanceWindow), isBlock: false, type: "simple", storageClassType: "string", }, start_hour_utc: { value: cdktf.numberToHclTerraform(struct.startHourUtc), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.redisCachePatchScheduleToHclTerraform = redisCachePatchScheduleToHclTerraform; class RedisCachePatchScheduleOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._dayOfWeek !== undefined) { hasAnyValues = true; internalValueResult.dayOfWeek = this._dayOfWeek; } if (this._maintenanceWindow !== undefined) { hasAnyValues = true; internalValueResult.maintenanceWindow = this._maintenanceWindow; } if (this._startHourUtc !== undefined) { hasAnyValues = true; internalValueResult.startHourUtc = this._startHourUtc; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._dayOfWeek = undefined; this._maintenanceWindow = undefined; this._startHourUtc = 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._dayOfWeek = value.dayOfWeek; this._maintenanceWindow = value.maintenanceWindow; this._startHourUtc = value.startHourUtc; } } get dayOfWeek() { return this.getStringAttribute('day_of_week'); } set dayOfWeek(value) { this._dayOfWeek = value; } // Temporarily expose input value. Use with caution. get dayOfWeekInput() { return this._dayOfWeek; } get maintenanceWindow() { return this.getStringAttribute('maintenance_window'); } set maintenanceWindow(value) { this._maintenanceWindow = value; } resetMaintenanceWindow() { this._maintenanceWindow = undefined; } // Temporarily expose input value. Use with caution. get maintenanceWindowInput() { return this._maintenanceWindow; } get startHourUtc() { return this.getNumberAttribute('start_hour_utc'); } set startHourUtc(value) { this._startHourUtc = value; } resetStartHourUtc() { this._startHourUtc = undefined; } // Temporarily expose input value. Use with caution. get startHourUtcInput() { return this._startHourUtc; } } exports.RedisCachePatchScheduleOutputReference = RedisCachePatchScheduleOutputReference; _b = JSII_RTTI_SYMBOL_1; RedisCachePatchScheduleOutputReference[_b] = { fqn: "@cdktf/provider-azurerm.redisCache.RedisCachePatchScheduleOutputReference", version: "12.27.0" }; class RedisCachePatchScheduleList 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 RedisCachePatchScheduleOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.RedisCachePatchScheduleList = RedisCachePatchScheduleList; _c = JSII_RTTI_SYMBOL_1; RedisCachePatchScheduleList[_c] = { fqn: "@cdktf/provider-azurerm.redisCache.RedisCachePatchScheduleList", version: "12.27.0" }; function redisCacheRedisConfigurationToTerraform(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 { active_directory_authentication_enabled: cdktf.booleanToTerraform(struct.activeDirectoryAuthenticationEnabled), aof_backup_enabled: cdktf.booleanToTerraform(struct.aofBackupEnabled), aof_storage_connection_string_0: cdktf.stringToTerraform(struct.aofStorageConnectionString0), aof_storage_connection_string_1: cdktf.stringToTerraform(struct.aofStorageConnectionString1), authentication_enabled: cdktf.booleanToTerraform(struct.authenticationEnabled), data_persistence_authentication_method: cdktf.stringToTerraform(struct.dataPersistenceAuthenticationMethod), enable_authentication: cdktf.booleanToTerraform(struct.enableAuthentication), maxfragmentationmemory_reserved: cdktf.numberToTerraform(struct.maxfragmentationmemoryReserved), maxmemory_delta: cdktf.numberToTerraform(struct.maxmemoryDelta), maxmemory_policy: cdktf.stringToTerraform(struct.maxmemoryPolicy), maxmemory_reserved: cdktf.numberToTerraform(struct.maxmemoryReserved), notify_keyspace_events: cdktf.stringToTerraform(struct.notifyKeyspaceEvents), rdb_backup_enabled: cdktf.booleanToTerraform(struct.rdbBackupEnabled), rdb_backup_frequency: cdktf.numberToTerraform(struct.rdbBackupFrequency), rdb_backup_max_snapshot_count: cdktf.numberToTerraform(struct.rdbBackupMaxSnapshotCount), rdb_storage_connection_string: cdktf.stringToTerraform(struct.rdbStorageConnectionString), storage_account_subscription_id: cdktf.stringToTerraform(struct.storageAccountSubscriptionId), }; } exports.redisCacheRedisConfigurationToTerraform = redisCacheRedisConfigurationToTerraform; function redisCacheRedisConfigurationToHclTerraform(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 = { active_directory_authentication_enabled: { value: cdktf.booleanToHclTerraform(struct.activeDirectoryAuthenticationEnabled), isBlock: false, type: "simple", storageClassType: "boolean", }, aof_backup_enabled: { value: cdktf.booleanToHclTerraform(struct.aofBackupEnabled), isBlock: false, type: "simple", storageClassType: "boolean", }, aof_storage_connection_string_0: { value: cdktf.stringToHclTerraform(struct.aofStorageConnectionString0), isBlock: false, type: "simple", storageClassType: "string", }, aof_storage_connection_string_1: { value: cdktf.stringToHclTerraform(struct.aofStorageConnectionString1), isBlock: false, type: "simple", storageClassType: "string", }, authentication_enabled: { value: cdktf.booleanToHclTerraform(struct.authenticationEnabled), isBlock: false, type: "simple", storageClassType: "boolean", }, data_persistence_authentication_method: { value: cdktf.stringToHclTerraform(struct.dataPersistenceAuthenticationMethod), isBlock: false, type: "simple", storageClassType: "string", }, enable_authentication: { value: cdktf.booleanToHclTerraform(struct.enableAuthentication), isBlock: false, type: "simple", storageClassType: "boolean", }, maxfragmentationmemory_reserved: { value: cdktf.numberToHclTerraform(struct.maxfragmentationmemoryReserved), isBlock: false, type: "simple", storageClassType: "number", }, maxmemory_delta: { value: cdktf.numberToHclTerraform(struct.maxmemoryDelta), isBlock: false, type: "simple", storageClassType: "number", }, maxmemory_policy: { value: cdktf.stringToHclTerraform(struct.maxmemoryPolicy), isBlock: false, type: "simple", storageClassType: "string", }, maxmemory_reserved: { value: cdktf.numberToHclTerraform(struct.maxmemoryReserved), isBlock: false, type: "simple", storageClassType: "number", }, notify_keyspace_events: { value: cdktf.stringToHclTerraform(struct.notifyKeyspaceEvents), isBlock: false, type: "simple", storageClassType: "string", }, rdb_backup_enabled: { value: cdktf.booleanToHclTerraform(struct.rdbBackupEnabled), isBlock: false, type: "simple", storageClassType: "boolean", }, rdb_backup_frequency: { value: cdktf.numberToHclTerraform(struct.rdbBackupFrequency), isBlock: false, type: "simple", storageClassType: "number", }, rdb_backup_max_snapshot_count: { value: cdktf.numberToHclTerraform(struct.rdbBackupMaxSnapshotCount), isBlock: false, type: "simple", storageClassType: "number", }, rdb_storage_connection_string: { value: cdktf.stringToHclTerraform(struct.rdbStorageConnectionString), isBlock: false, type: "simple", storageClassType: "string", }, storage_account_subscription_id: { value: cdktf.stringToHclTerraform(struct.storageAccountSubscriptionId), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.redisCacheRedisConfigurationToHclTerraform = redisCacheRedisConfigurationToHclTerraform; class RedisCacheRedisConfigurationOutputReference 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._activeDirectoryAuthenticationEnabled !== undefined) { hasAnyValues = true; internalValueResult.activeDirectoryAuthenticationEnabled = this._activeDirectoryAuthenticationEnabled; } if (this._aofBackupEnabled !== undefined) { hasAnyValues = true; internalValueResult.aofBackupEnabled = this._aofBackupEnabled; } if (this._aofStorageConnectionString0 !== undefined) { hasAnyValues = true; internalValueResult.aofStorageConnectionString0 = this._aofStorageConnectionString0; } if (this._aofStorageConnectionString1 !== undefined) { hasAnyValues = true; internalValueResult.aofStorageConnectionString1 = this._aofStorageConnectionString1; } if (this._authenticationEnabled !== undefined) { hasAnyValues = true; internalValueResult.authenticationEnabled = this._authenticationEnabled; } if (this._dataPersistenceAuthenticationMethod !== undefined) { hasAnyValues = true; internalValueResult.dataPersistenceAuthenticationMethod = this._dataPersistenceAuthenticationMethod; } if (this._enableAuthentication !== undefined) { hasAnyValues = true; internalValueResult.enableAuthentication = this._enableAuthentication; } if (this._maxfragmentationmemoryReserved !== undefined) { hasAnyValues = true; internalValueResult.maxfragmentationmemoryReserved = this._maxfragmentationmemoryReserved; } if (this._maxmemoryDelta !== undefined) { hasAnyValues = true; internalValueResult.maxmemoryDelta = this._maxmemoryDelta; } if (this._maxmemoryPolicy !== undefined) { hasAnyValues = true; internalValueResult.maxmemoryPolicy = this._maxmemoryPolicy; } if (this._maxmemoryReserved !== undefined) { hasAnyValues = true; internalValueResult.maxmemoryReserved = this._maxmemoryReserved; } if (this._notifyKeyspaceEvents !== undefined) { hasAnyValues = true; internalValueResult.notifyKeyspaceEvents = this._notifyKeyspaceEvents; } if (this._rdbBackupEnabled !== undefined) { hasAnyValues = true; internalValueResult.rdbBackupEnabled = this._rdbBackupEnabled; } if (this._rdbBackupFrequency !== undefined) { hasAnyValues = true; internalValueResult.rdbBackupFrequency = this._rdbBackupFrequency; } if (this._rdbBackupMaxSnapshotCount !== undefined) { hasAnyValues = true; internalValueResult.rdbBackupMaxSnapshotCount = this._rdbBackupMaxSnapshotCount; } if (this._rdbStorageConnectionString !== undefined) { hasAnyValues = true; internalValueResult.rdbStorageConnectionString = this._rdbStorageConnectionString; } if (this._storageAccountSubscriptionId !== undefined) { hasAnyValues = true; internalValueResult.storageAccountSubscriptionId = this._storageAccountSubscriptionId; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._activeDirectoryAuthenticationEnabled = undefined; this._aofBackupEnabled = undefined; this._aofStorageConnectionString0 = undefined; this._aofStorageConnectionString1 = undefined; this._authenticationEnabled = undefined; this._dataPersistenceAuthenticationMethod = undefined; this._enableAuthentication = undefined; this._maxfragmentationmemoryReserved = undefined; this._maxmemoryDelta = undefined; this._maxmemoryPolicy = undefined; this._maxmemoryReserved = undefined; this._notifyKeyspaceEvents = undefined; this._rdbBackupEnabled = undefined; this._rdbBackupFrequency = undefined; this._rdbBackupMaxSnapshotCount = undefined; this._rdbStorageConnectionString = undefined; this._storageAccountSubscriptionId = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._activeDirectoryAuthenticationEnabled = value.activeDirectoryAuthenticationEnabled; this._aofBackupEnabled = value.aofBackupEnabled; this._aofStorageConnectionString0 = value.aofStorageConnectionString0; this._aofStorageConnectionString1 = value.aofStorageConnectionString1; this._authenticationEnabled = value.authenticationEnabled; this._dataPersistenceAuthenticationMethod = value.dataPersistenceAuthenticationMethod; this._enableAuthentication = value.enableAuthentication; this._maxfragmentationmemoryReserved = value.maxfragmentationmemoryReserved; this._maxmemoryDelta = value.maxmemoryDelta; this._maxmemoryPolicy = value.maxmemoryPolicy; this._maxmemoryReserved = value.maxmemoryReserved; this._notifyKeyspaceEvents = value.notifyKeyspaceEvents; this._rdbBackupEnabled = value.rdbBackupEnabled; this._rdbBackupFrequency = value.rdbBackupFrequency; this._rdbBackupMaxSnapshotCount = value.rdbBackupMaxSnapshotCount; this._rdbStorageConnectionString = value.rdbStorageConnectionString; this._storageAccountSubscriptionId = value.storageAccountSubscriptionId; } } get activeDirectoryAuthenticationEnabled() { return this.getBooleanAttribute('active_directory_authentication_enabled'); } set activeDirectoryAuthenticationEnabled(value) { this._activeDirectoryAuthenticationEnabled = value; } resetActiveDirectoryAuthenticationEnabled() { this._activeDirectoryAuthenticationEnabled = undefined; } // Temporarily expose input value. Use with caution. get activeDirectoryAuthenticationEnabledInput() { return this._activeDirectoryAuthenticationEnabled; } get aofBackupEnabled() { return this.getBooleanAttribute('aof_backup_enabled'); } set aofBackupEnabled(value) { this._aofBackupEnabled = value; } resetAofBackupEnabled() { this._aofBackupEnabled = undefined; } // Temporarily expose input value. Use with caution. get aofBackupEnabledInput() { return this._aofBackupEnabled; } get aofStorageConnectionString0() { return this.getStringAttribute('aof_storage_connection_string_0'); } set aofStorageConnectionString0(value) { this._aofStorageConnectionString0 = value; } resetAofStorageConnectionString0() { this._aofStorageConnectionString0 = undefined; } // Temporarily expose input value. Use with caution. get aofStorageConnectionString0Input() { return this._aofStorageConnectionString0; } get aofStorageConnectionString1() { return this.getStringAttribute('aof_storage_connection_string_1'); } set aofStorageConnectionString1(value) { this._aofStorageConnectionString1 = value; } resetAofStorageConnectionString1() { this._aofStorageConnectionString1 = undefined; } // Temporarily expose input value. Use with caution. get aofStorageConnectionString1Input() { return this._aofStorageConnectionString1; } get authenticationEnabled() { return this.getBooleanAttribute('authentication_enabled'); } set authenticationEnabled(value) { this._authenticationEnabled = value; } resetAuthenticationEnabled() { this._authenticationEnabled = undefined; } // Temporarily expose input value. Use with caution. get authenticationEnabledInput() { return this._authenticationEnabled; } get dataPersistenceAuthenticationMethod() { return this.getStringAttribute('data_persistence_authentication_method'); } set dataPersistenceAuthenticationMethod(value) { this._dataPersistenceAuthenticationMethod = value; } resetDataPersistenceAuthenticationMethod() { this._dataPersistenceAuthenticationMethod = undefined; } // Temporarily expose input value. Use with caution. get dataPersistenceAuthenticationMethodInput() { return this._dataPersistenceAuthenticationMethod; } get enableAuthentication() { return this.getBooleanAttribute('enable_authentication'); } set enableAuthentication(value) { this._enableAuthentication = value; } resetEnableAuthentication() { this._enableAuthentication = undefined; } // Temporarily expose input value. Use with caution. get enableAuthenticationInput() { return this._enableAuthentication; } // maxclients - computed: true, optional: false, required: false get maxclients() { return this.getNumberAttribute('maxclients'); } get maxfragmentationmemoryReserved() { return this.getNumberAttribute('maxfragmentationmemory_reserved'); } set maxfragmentationmemoryReserved(value) { this._maxfragmentationmemoryReserved = value; } resetMaxfragmentationmemoryReserved() { this._maxfragmentationmemoryReserved = undefined; } // Temporarily expose input value. Use with caution. get maxfragmentationmemoryReservedInput() { return this._maxfragmentationmemoryReserved; } get maxmemoryDelta() { return this.getNumberAttribute('maxmemory_delta'); } set maxmemoryDelta(value) { this._maxmemoryDelta = value; } resetMaxmemoryDelta() { this._maxmemoryDelta = undefined; } // Temporarily expose input value. Use with caution. get maxmemoryDeltaInput() { return this._maxmemoryDelta; } get maxmemoryPolicy() { return this.getStringAttribute('maxmemory_policy'); } set maxmemoryPolicy(value) { this._maxmemoryPolicy = value; } resetMaxmemoryPolicy() { this._maxmemoryPolicy = undefined; } // Temporarily expose input value. Use with caution. get maxmemoryPolicyInput() { return this._maxmemoryPolicy; } get maxmemoryReserved() { return this.getNumberAttribute('maxmemory_reserved'); } set maxmemoryReserved(value) { this._maxmemoryReserved = value; } resetMaxmemoryReserved() { this._maxmemoryReserved = undefined; } // Temporarily expose input value. Use with caution. get maxmemoryReservedInput() { return this._maxmemoryReserved; } get notifyKeyspaceEvents() { return this.getStringAttribute('notify_keyspace_events'); } set notifyKeyspaceEvents(value) { this._notifyKeyspaceEvents = value; } resetNotifyKeyspaceEvents() { this._notifyKeyspaceEvents = undefined; } // Temporarily expose input value. Use with caution. get notifyKeyspaceEventsInput() { return this._notifyKeyspaceEvents; } get rdbBackupEnabled() { return this.getBooleanAttribute('rdb_backup_enabled'); } set rdbBackupEnabled(value) { this._rdbBackupEnabled = value; } resetRdbBackupEnabled() { this._rdbBackupEnabled = undefined; } // Temporarily expose input value. Use with caution. get rdbBackupEnabledInput() { return this._rdbBackupEnabled; } get rdbBackupFrequency() { return this.getNumberAttribute('rdb_backup_frequency'); } set rdbBackupFrequency(value) { this._rdbBackupFrequency = value; } resetRdbBackupFrequency() { this._rdbBackupFrequency = undefined; } // Temporarily expose input value. Use with caution. get rdbBackupFrequencyInput() { return this._rdbBackupFrequency; } get rdbBackupMaxSnapshotCount() { return this.getNumberAttribute('rdb_backup_max_snapshot_count'); } set rdbBackupMaxSnapshotCount(value) { this._rdbBackupMaxSnapshotCount = value; } resetRdbBackupMaxSnapshotCount() { this._rdbBackupMaxSnapshotCount = undefined; } // Temporarily expose input value. Use with caution. get rdbBackupMaxSnapshotCountInput() { return this._rdbBackupMaxSnapshotCount; } get rdbStorageConnectionString() { return this.getStringAttribute('rdb_storage_connection_string'); } set rdbStorageConnectionString(value) { this._rdbStorageConnectionString = value; } resetRdbStorageConnectionString() { this._rdbStorageConnectionString = undefined; } // Temporarily expose input value. Use with caution. get rdbStorageConnectionStringInput() { return this._rdbStorageConnectionString; } get storageAccountSubscriptionId() { return this.getStringAttribute('storage_account_subscription_id'); } set storageAccountSubscriptionId(value) { this._storageAccountSubscriptionId = value; } resetStorageAccountSubscriptionId() { this._storageAccountSubscriptionId = undefined; } // Temporarily expose input value. Use with caution. get storageAccountSubscriptionIdInput() { return this._storageAccountSubscriptionId; } } exports.RedisCacheRedisConfigurationOutputReference = RedisCacheRedisConfigurationOutputReference; _d = JSII_RTTI_SYMBOL_1; RedisCacheRedisConfigurationOutputReference[_d] = { fqn: "@cdktf/provider-azurerm.redisCache.RedisCacheRedisConfigurationOutputReference", version: "12.27.0" }; function redisCacheTimeoutsToTerraform(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), read: cdktf.stringToTerraform(struct.read), update: cdktf.stringToTerraform(struct.update), }; } exports.redisCacheTimeoutsToTerraform = redisCacheTimeoutsToTerraform; function redisCacheTimeoutsToHclTerraform(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", }, read: { value: cdktf.stringToHclTerraform(struct.read), 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)); } exports.redisCacheTimeoutsToHclTerraform = redisCacheTimeoutsToHclTerraform; class RedisCacheTimeoutsOutputReference 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._read !== undefined) { hasAnyValues = true; internalValueResult.read = this._read; } 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._read = 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._read = value.read; 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 read() { return this.getStringAttribute('read'); } set read(value) { this._read = value; } resetRead() { this._read = undefined; } // Temporarily expose input value. Use with caution. get readInput() { return this._read; } 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.RedisCacheTimeoutsOutputReference = RedisCacheTimeoutsOutputReference; _e = JSII_RTTI_SYMBOL_1; RedisCacheTimeoutsOutputReference[_e] = { fqn: "@cdktf/provider-azurerm.redisCache.RedisCacheTimeoutsOutputReference", version: "12.27.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/redis_cache azurerm_redis_cache} */ class RedisCache extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a RedisCache 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 RedisCache to import * @param importFromId The id of the existing RedisCache that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/redis_cache#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the RedisCache to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_redis_cache", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/redis_cache azurerm_redis_cache} 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 RedisCacheConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'azurerm_redis_cache', terraformGeneratorMetadata: { providerName: 'azurerm', providerVersion: '3.116.0', providerVersionConstraint: '~> 3.10' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); // identity - computed: false, optional: true, required: false this._identity = new RedisCacheIdentityOutputReference(this, "identity"); // patch_schedule - computed: false, optional: true, required: false this._patchSchedule = new RedisCachePatchScheduleList(this, "patch_schedule", false); // redis_configuration - computed: false, optional: true, required: false this._redisConfiguration = new RedisCacheRedisConfigurationOutputReference(this, "redis_configuration"); // timeouts - computed: false, optional: true, required: false this._timeouts = new RedisCacheTimeoutsOutputReference(this, "timeouts"); this._capacity = config.capacity; this._enableNonSslPort = config.enableNonSslPort; this._family = config.family; this._id = config.id; this._location = config.location; this._minimumTlsVersion = config.minimumTlsVersion; this._name = config.name; this._nonSslPortEnabled = config.nonSslPortEnabled; this._privateStaticIpAddress = config.privateStaticIpAddress; this._publicNetworkAccessEnabled = config.publicNetworkAccessEnabled; this._redisVersion = config.redisVersion; this._replicasPerMaster = config.replicasPerMaster; this._replicasPerPrimary = config.replicasPerPrimary; this._resourceGroupName = config.resourceGroupName; this._shardCount = config.shardCount; this._skuName = config.skuName; this._subnetId = config.subnetId; this._tags = config.tags; this._tenantSettings = config.tenantSettings; this._zones = config.zones; this._identity.internalValue = config.identity; this._patchSchedule.internalValue = config.patchSchedule; this._redisConfiguration.internalValue = config.redisConfiguration; this._timeouts.internalValue = config.timeouts; } get capacity() { return this.getNumberAttribute('capacity'); } set capacity(value) { this._capacity = value; } // Temporarily expose input value. Use with caution. get capacityInput() { return this._capacity; } get enableNonSslPort() { return this.getBooleanAttribute('enable_non_ssl_port'); } set enableNonSslPort(value) { this._enableNonSslPort = value; } resetEnableNonSslPort() { this._enableNonSslPort = undefined; } // Temporarily expose input value. Use with caution. get enableNonSslPortInput() { return this._enableNonSslPort; } get family() { return this.getStringAttribute('family'); } set family(value) { this._family = value; } // Temporarily expose input value. Use with caution. get familyInput() { return this._family; } // hostname - computed: true, optional: false, required: false get hostname() { return this.getStringAttribute('hostname'); } 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 location() { return this.getStringAttribute('location'); } set location(value) { this._location = value; } // Temporarily expose input value. Use with caution. get locationInput() { return this._location; } get minimumTlsVersion() { return this.getStringAttribute('minimum_tls_version'); } set minimumTlsVersion(value) { this._minimumTlsVersion = value; } resetMinimumTlsVersion() { this._minimumTlsVersion = undefined; } // Temporarily expose input value. Use with caution. get minimumTlsVersionInput() { return this._minimumTlsVersion; } 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 nonSslPortEnabled() { return this.getBooleanAttribute('non_ssl_port_enabled'); } set nonSslPortEnabled(value) { this._nonSslPortEnabled = value; } resetNonSslPortEnabled() { this._nonSslPortEnabled = undefined; } // Temporarily expose input value. Use with caution. get nonSslPortEnabledInput() { return this._nonSslPortEnabled; } // port - computed: true, optional: false, required: false get port() { return this.getNumberAttribute('port'); } // primary_access_key - computed: true, optional: false, required: false get primaryAccessKey() { return this.getStringAttribute('primary_access_key'); } // primary_connection_string - computed: true, optional: false, required: false get primaryConnectionString() { return this.getStringAttribute('primary_connection_string'); } get privateStaticIpAddress() { return this.getStringAttribute('private_static_ip_address'); } set privateStaticIpAddress(value) { this._privateStaticIpAddress = value; } resetPrivateStaticIpAddress() { this._privateStaticIpAddress = undefined; } // Temporarily expose input value. Use with caution. get privateStaticIpAddressInput() { return this._privateStaticIpAddress; } get publicNetworkAccessEnabled() { return this.getBooleanAttribute('public_network_access_enabled'); } set publicNetworkAccessEnabled(value) { this._publicNetworkAccessEnabled = value; } resetPublicNetworkAccessEnabled() { this._publicNetworkAccessEnabled = undefined; } // Temporarily expose input value. Use with caution. get publicNetworkAccessEnabledInput() { return this._publicNetworkAccessEnabled; } get redisVersion() { return this.getStringAttribute('redis_version'); } set redisVersion(value) { this._redisVersion = value; } resetRedisVersion() { this._redisVersion = undefined; } // Temporarily expose input value. Use with caution. get redisVersionInput() { return this._redisVersion; } get replicasPerMaster() { return this.getNumberAttribute('replicas_per_master'); } set replicasPerMaster(value) { this._replicasPerMaster = value; } resetReplicasPerMaster() { this._replicasPerMaster = undefined; } // Temporarily expose input value. Use with caution. get replicasPerMasterInput() { return this._replicasPerMaster; } get replicasPerPrimary() { return this.getNumberAttribute('replicas_per_primary'); } set replicasPerPrimary(value) { this._replicasPerPrimary = value; } resetReplicasPerPrimary() { this._replicasPerPrimary = undefined; } // Temporarily expose input value. Use with caution. get replicasPerPrimaryInput() { return this._replicasPerPrimary; } get resourceGroupName() { return this.getStringAttribute('resource_group_name'); } set resourceGroupName(value) { this._resourceGroupName = value; } // Temporarily expose input value. Use with caution. get resourceGroupNameInput() { return this._resourceGroupName; } // secondary_access_key - computed: true, optional: false, required: false get secondaryAccessKey() { return this.getStringAttribute('secondary_access_key'); } // secondary_connection_string - computed: true, optional: false, required: false get secondaryConnectionString() { return this.getStringAttribute('secondary_connection_string'); } get shardCount() { return this.getNumberAttribute('shard_count'); } set shardCount(value) { this._shardCount = value; } resetShardCount() { this._shardCount = undefined; } // Temporarily expose input value. Use with caution. get shardCountInput() { return this._shardCount; } get skuName() { return this.getStringAttribute('sku_name'); } set skuName(value) { this._skuName = value; } // Temporarily expose input value. Use with caution. get skuNameInput() { return this._skuName; } // ssl_port - computed: true, optional: false, required: false get sslPort() { return this.getNumberAttribute('ssl_port'); } get subnetId() { return this.getStringAttribute('subnet_id'); } set subnetId(value) { this._subnetId = value; } resetSubnetId() { this._subnetId = undefined; } // Temporarily expose input value. Use with caution. get subnetIdInput() { return this._subnetId; } 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 tenantSettings() { return this.getStringMapAttribute('tenant_settings'); } set tenantSettings(value) { this._tenantSettings = value; } resetTenantSettings() { this._tenantSettings = undefined; } // Temporarily expose input value. Use with caution. get tenantSettingsInput() { return this._tenantSettings; } get zones() { return cdktf.Fn.tolist(this.getListAttribute('zones')); } set zones(value) { this._zones = value; } resetZones() { this._zones = undefined; } // Temporarily expose input value. Use with caution. get zonesInput() { return this._zones; } get identity() { return this._identity; } putIdentity(value) { this._identity.internalValue = value; } resetIdentity() { this._identity.internalValue = undefined; } // Temporarily expose input value. Use with caution. get identityInput() {