@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,190 lines • 164 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ElasticacheCluster = exports.ElasticacheClusterTimeoutsOutputReference = exports.ElasticacheClusterLogDeliveryConfigurationList = exports.ElasticacheClusterLogDeliveryConfigurationOutputReference = exports.ElasticacheClusterCacheNodesList = exports.ElasticacheClusterCacheNodesOutputReference = void 0;
exports.elasticacheClusterCacheNodesToTerraform = elasticacheClusterCacheNodesToTerraform;
exports.elasticacheClusterCacheNodesToHclTerraform = elasticacheClusterCacheNodesToHclTerraform;
exports.elasticacheClusterLogDeliveryConfigurationToTerraform = elasticacheClusterLogDeliveryConfigurationToTerraform;
exports.elasticacheClusterLogDeliveryConfigurationToHclTerraform = elasticacheClusterLogDeliveryConfigurationToHclTerraform;
exports.elasticacheClusterTimeoutsToTerraform = elasticacheClusterTimeoutsToTerraform;
exports.elasticacheClusterTimeoutsToHclTerraform = elasticacheClusterTimeoutsToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function elasticacheClusterCacheNodesToTerraform(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 elasticacheClusterCacheNodesToHclTerraform(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 ElasticacheClusterCacheNodesOutputReference 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;
}
}
// address - computed: true, optional: false, required: false
get address() {
return this.getStringAttribute('address');
}
// availability_zone - computed: true, optional: false, required: false
get availabilityZone() {
return this.getStringAttribute('availability_zone');
}
// id - computed: true, optional: false, required: false
get id() {
return this.getStringAttribute('id');
}
// outpost_arn - computed: true, optional: false, required: false
get outpostArn() {
return this.getStringAttribute('outpost_arn');
}
// port - computed: true, optional: false, required: false
get port() {
return this.getNumberAttribute('port');
}
}
exports.ElasticacheClusterCacheNodesOutputReference = ElasticacheClusterCacheNodesOutputReference;
_a = JSII_RTTI_SYMBOL_1;
ElasticacheClusterCacheNodesOutputReference[_a] = { fqn: "@cdktf/provider-aws.elasticacheCluster.ElasticacheClusterCacheNodesOutputReference", version: "21.22.1" };
class ElasticacheClusterCacheNodesList 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 ElasticacheClusterCacheNodesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ElasticacheClusterCacheNodesList = ElasticacheClusterCacheNodesList;
_b = JSII_RTTI_SYMBOL_1;
ElasticacheClusterCacheNodesList[_b] = { fqn: "@cdktf/provider-aws.elasticacheCluster.ElasticacheClusterCacheNodesList", version: "21.22.1" };
function elasticacheClusterLogDeliveryConfigurationToTerraform(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 {
destination: cdktf.stringToTerraform(struct.destination),
destination_type: cdktf.stringToTerraform(struct.destinationType),
log_format: cdktf.stringToTerraform(struct.logFormat),
log_type: cdktf.stringToTerraform(struct.logType),
};
}
function elasticacheClusterLogDeliveryConfigurationToHclTerraform(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 = {
destination: {
value: cdktf.stringToHclTerraform(struct.destination),
isBlock: false,
type: "simple",
storageClassType: "string",
},
destination_type: {
value: cdktf.stringToHclTerraform(struct.destinationType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
log_format: {
value: cdktf.stringToHclTerraform(struct.logFormat),
isBlock: false,
type: "simple",
storageClassType: "string",
},
log_type: {
value: cdktf.stringToHclTerraform(struct.logType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ElasticacheClusterLogDeliveryConfigurationOutputReference 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._destination !== undefined) {
hasAnyValues = true;
internalValueResult.destination = this._destination;
}
if (this._destinationType !== undefined) {
hasAnyValues = true;
internalValueResult.destinationType = this._destinationType;
}
if (this._logFormat !== undefined) {
hasAnyValues = true;
internalValueResult.logFormat = this._logFormat;
}
if (this._logType !== undefined) {
hasAnyValues = true;
internalValueResult.logType = this._logType;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._destination = undefined;
this._destinationType = undefined;
this._logFormat = undefined;
this._logType = 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._destination = value.destination;
this._destinationType = value.destinationType;
this._logFormat = value.logFormat;
this._logType = value.logType;
}
}
get destination() {
return this.getStringAttribute('destination');
}
set destination(value) {
this._destination = value;
}
// Temporarily expose input value. Use with caution.
get destinationInput() {
return this._destination;
}
get destinationType() {
return this.getStringAttribute('destination_type');
}
set destinationType(value) {
this._destinationType = value;
}
// Temporarily expose input value. Use with caution.
get destinationTypeInput() {
return this._destinationType;
}
get logFormat() {
return this.getStringAttribute('log_format');
}
set logFormat(value) {
this._logFormat = value;
}
// Temporarily expose input value. Use with caution.
get logFormatInput() {
return this._logFormat;
}
get logType() {
return this.getStringAttribute('log_type');
}
set logType(value) {
this._logType = value;
}
// Temporarily expose input value. Use with caution.
get logTypeInput() {
return this._logType;
}
}
exports.ElasticacheClusterLogDeliveryConfigurationOutputReference = ElasticacheClusterLogDeliveryConfigurationOutputReference;
_c = JSII_RTTI_SYMBOL_1;
ElasticacheClusterLogDeliveryConfigurationOutputReference[_c] = { fqn: "@cdktf/provider-aws.elasticacheCluster.ElasticacheClusterLogDeliveryConfigurationOutputReference", version: "21.22.1" };
class ElasticacheClusterLogDeliveryConfigurationList 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 ElasticacheClusterLogDeliveryConfigurationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ElasticacheClusterLogDeliveryConfigurationList = ElasticacheClusterLogDeliveryConfigurationList;
_d = JSII_RTTI_SYMBOL_1;
ElasticacheClusterLogDeliveryConfigurationList[_d] = { fqn: "@cdktf/provider-aws.elasticacheCluster.ElasticacheClusterLogDeliveryConfigurationList", version: "21.22.1" };
function elasticacheClusterTimeoutsToTerraform(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 elasticacheClusterTimeoutsToHclTerraform(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 ElasticacheClusterTimeoutsOutputReference 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.ElasticacheClusterTimeoutsOutputReference = ElasticacheClusterTimeoutsOutputReference;
_e = JSII_RTTI_SYMBOL_1;
ElasticacheClusterTimeoutsOutputReference[_e] = { fqn: "@cdktf/provider-aws.elasticacheCluster.ElasticacheClusterTimeoutsOutputReference", version: "21.22.1" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/elasticache_cluster aws_elasticache_cluster}
*/
class ElasticacheCluster extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a ElasticacheCluster 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 ElasticacheCluster to import
* @param importFromId The id of the existing ElasticacheCluster that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/elasticache_cluster#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the ElasticacheCluster to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_elasticache_cluster", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/elasticache_cluster aws_elasticache_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 ElasticacheClusterConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'aws_elasticache_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
});
// cache_nodes - computed: true, optional: false, required: false
this._cacheNodes = new ElasticacheClusterCacheNodesList(this, "cache_nodes", false);
// log_delivery_configuration - computed: false, optional: true, required: false
this._logDeliveryConfiguration = new ElasticacheClusterLogDeliveryConfigurationList(this, "log_delivery_configuration", true);
// timeouts - computed: false, optional: true, required: false
this._timeouts = new ElasticacheClusterTimeoutsOutputReference(this, "timeouts");
this._applyImmediately = config.applyImmediately;
this._autoMinorVersionUpgrade = config.autoMinorVersionUpgrade;
this._availabilityZone = config.availabilityZone;
this._azMode = config.azMode;
this._clusterId = config.clusterId;
this._engine = config.engine;
this._engineVersion = config.engineVersion;
this._finalSnapshotIdentifier = config.finalSnapshotIdentifier;
this._id = config.id;
this._ipDiscovery = config.ipDiscovery;
this._maintenanceWindow = config.maintenanceWindow;
this._networkType = config.networkType;
this._nodeType = config.nodeType;
this._notificationTopicArn = config.notificationTopicArn;
this._numCacheNodes = config.numCacheNodes;
this._outpostMode = config.outpostMode;
this._parameterGroupName = config.parameterGroupName;
this._port = config.port;
this._preferredAvailabilityZones = config.preferredAvailabilityZones;
this._preferredOutpostArn = config.preferredOutpostArn;
this._region = config.region;
this._replicationGroupId = config.replicationGroupId;
this._securityGroupIds = config.securityGroupIds;
this._snapshotArns = config.snapshotArns;
this._snapshotName = config.snapshotName;
this._snapshotRetentionLimit = config.snapshotRetentionLimit;
this._snapshotWindow = config.snapshotWindow;
this._subnetGroupName = config.subnetGroupName;
this._tags = config.tags;
this._tagsAll = config.tagsAll;
this._transitEncryptionEnabled = config.transitEncryptionEnabled;
this._logDeliveryConfiguration.internalValue = config.logDeliveryConfiguration;
this._timeouts.internalValue = config.timeouts;
}
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 autoMinorVersionUpgrade() {
return this.getStringAttribute('auto_minor_version_upgrade');
}
set autoMinorVersionUpgrade(value) {
this._autoMinorVersionUpgrade = value;
}
resetAutoMinorVersionUpgrade() {
this._autoMinorVersionUpgrade = undefined;
}
// Temporarily expose input value. Use with caution.
get autoMinorVersionUpgradeInput() {
return this._autoMinorVersionUpgrade;
}
get availabilityZone() {
return this.getStringAttribute('availability_zone');
}
set availabilityZone(value) {
this._availabilityZone = value;
}
resetAvailabilityZone() {
this._availabilityZone = undefined;
}
// Temporarily expose input value. Use with caution.
get availabilityZoneInput() {
return this._availabilityZone;
}
get azMode() {
return this.getStringAttribute('az_mode');
}
set azMode(value) {
this._azMode = value;
}
resetAzMode() {
this._azMode = undefined;
}
// Temporarily expose input value. Use with caution.
get azModeInput() {
return this._azMode;
}
get cacheNodes() {
return this._cacheNodes;
}
// cluster_address - computed: true, optional: false, required: false
get clusterAddress() {
return this.getStringAttribute('cluster_address');
}
get clusterId() {
return this.getStringAttribute('cluster_id');
}
set clusterId(value) {
this._clusterId = value;
}
// Temporarily expose input value. Use with caution.
get clusterIdInput() {
return this._clusterId;
}
// configuration_endpoint - computed: true, optional: false, required: false
get configurationEndpoint() {
return this.getStringAttribute('configuration_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;
}
// engine_version_actual - computed: true, optional: false, required: false
get engineVersionActual() {
return this.getStringAttribute('engine_version_actual');
}
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 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 ipDiscovery() {
return this.getStringAttribute('ip_discovery');
}
set ipDiscovery(value) {
this._ipDiscovery = value;
}
resetIpDiscovery() {
this._ipDiscovery = undefined;
}
// Temporarily expose input value. Use with caution.
get ipDiscoveryInput() {
return this._ipDiscovery;
}
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 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 nodeType() {
return this.getStringAttribute('node_type');
}
set nodeType(value) {
this._nodeType = value;
}
resetNodeType() {
this._nodeType = undefined;
}
// Temporarily expose input value. Use with caution.
get nodeTypeInput() {
return this._nodeType;
}
get notificationTopicArn() {
return this.getStringAttribute('notification_topic_arn');
}
set notificationTopicArn(value) {
this._notificationTopicArn = value;
}
resetNotificationTopicArn() {
this._notificationTopicArn = undefined;
}
// Temporarily expose input value. Use with caution.
get notificationTopicArnInput() {
return this._notificationTopicArn;
}
get numCacheNodes() {
return this.getNumberAttribute('num_cache_nodes');
}
set numCacheNodes(value) {
this._numCacheNodes = value;
}
resetNumCacheNodes() {
this._numCacheNodes = undefined;
}
// Temporarily expose input value. Use with caution.
get numCacheNodesInput() {
return this._numCacheNodes;
}
get outpostMode() {
return this.getStringAttribute('outpost_mode');
}
set outpostMode(value) {
this._outpostMode = value;
}
resetOutpostMode() {
this._outpostMode = undefined;
}
// Temporarily expose input value. Use with caution.
get outpostModeInput() {
return this._outpostMode;
}
get parameterGroupName() {
return this.getStringAttribute('parameter_group_name');
}
set parameterGroupName(value) {
this._parameterGroupName = value;
}
resetParameterGroupName() {
this._parameterGroupName = undefined;
}
// Temporarily expose input value. Use with caution.
get parameterGroupNameInput() {
return this._parameterGroupName;
}
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 preferredAvailabilityZones() {
return this.getListAttribute('preferred_availability_zones');
}
set preferredAvailabilityZones(value) {
this._preferredAvailabilityZones = value;
}
resetPreferredAvailabilityZones() {
this._preferredAvailabilityZones = undefined;
}
// Temporarily expose input value. Use with caution.
get preferredAvailabilityZonesInput() {
return this._preferredAvailabilityZones;
}
get preferredOutpostArn() {
return this.getStringAttribute('preferred_outpost_arn');
}
set preferredOutpostArn(value) {
this._preferredOutpostArn = value;
}
resetPreferredOutpostArn() {
this._preferredOutpostArn = undefined;
}
// Temporarily expose input value. Use with caution.
get preferredOutpostArnInput() {
return this._preferredOutpostArn;
}
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 replicationGroupId() {
return this.getStringAttribute('replication_group_id');
}
set replicationGroupId(value) {
this._replicationGroupId = value;
}
resetReplicationGroupId() {
this._replicationGroupId = undefined;
}
// Temporarily expose input value. Use with caution.
get replicationGroupIdInput() {
return this._replicationGroupId;
}
get securityGroupIds() {
return cdktf.Fn.tolist(this.getListAttribute('security_group_ids'));
}
set securityGroupIds(value) {
this._securityGroupIds = value;
}
resetSecurityGroupIds() {
this._securityGroupIds = undefined;
}
// Temporarily expose input value. Use with caution.
get securityGroupIdsInput() {
return this._securityGroupIds;
}
get snapshotArns() {
return this.getListAttribute('snapshot_arns');
}
set snapshotArns(value) {
this._snapshotArns = value;
}
resetSnapshotArns() {
this._snapshotArns = undefined;
}
// Temporarily expose input value. Use with caution.
get snapshotArnsInput() {
return this._snapshotArns;
}
get snapshotName() {
return this.getStringAttribute('snapshot_name');
}
set snapshotName(value) {
this._snapshotName = value;
}
resetSnapshotName() {
this._snapshotName = undefined;
}
// Temporarily expose input value. Use with caution.
get snapshotNameInput() {
return this._snapshotName;
}
get snapshotRetentionLimit() {
return this.getNumberAttribute('snapshot_retention_limit');
}
set snapshotRetentionLimit(value) {
this._snapshotRetentionLimit = value;
}
resetSnapshotRetentionLimit() {
this._snapshotRetentionLimit = undefined;
}
// Temporarily expose input value. Use with caution.
get snapshotRetentionLimitInput() {
return this._snapshotRetentionLimit;
}
get snapshotWindow() {
return this.getStringAttribute('snapshot_window');
}
set snapshotWindow(value) {
this._snapshotWindow = value;
}
resetSnapshotWindow() {
this._snapshotWindow = undefined;
}
// Temporarily expose input value. Use with caution.
get snapshotWindowInput() {
return this._snapshotWindow;
}
get subnetGroupName() {
return this.getStringAttribute('subnet_group_name');
}
set subnetGroupName(value) {
this._subnetGroupName = value;
}
resetSubnetGroupName() {
this._subnetGroupName = undefined;
}
// Temporarily expose input value. Use with caution.
get subnetGroupNameInput() {
return this._subnetGroupName;
}
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 transitEncryptionEnabled() {
return this.getBooleanAttribute('transit_encryption_enabled');
}
set transitEncryptionEnabled(value) {
this._transitEncryptionEnabled = value;
}
resetTransitEncryptionEnabled() {
this._transitEncryptionEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get transitEncryptionEnabledInput() {
return this._transitEncryptionEnabled;
}
get logDeliveryConfiguration() {
return this._logDeliveryConfiguration;
}
putLogDeliveryConfiguration(value) {
this._logDeliveryConfiguration.internalValue = value;
}
resetLogDeliveryConfiguration() {
this._logDeliveryConfiguration.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get logDeliveryConfigurationInput() {
return this._logDeliveryConfiguration.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 {
apply_immediately: cdktf.booleanToTerraform(this._applyImmediately),
auto_minor_version_upgrade: cdktf.stringToTerraform(this._autoMinorVersionUpgrade),
availability_zone: cdktf.stringToTerraform(this._availabilityZone),
az_mode: cdktf.stringToTerraform(this._azMode),
cluster_id: cdktf.stringToTerraform(this._clusterId),
engine: cdktf.stringToTerraform(this._engine),
engine_version: cdktf.stringToTerraform(this._engineVersion),
final_snapshot_identifier: cdktf.stringToTerraform(this._finalSnapshotIdentifier),
id: cdktf.stringToTerraform(this._id),
ip_discovery: cdktf.stringToTerraform(this._ipDiscovery),
maintenance_window: cdktf.stringToTerraform(this._maintenanceWindow),
network_type: cdktf.stringToTerraform(this._networkType),
node_type: cdktf.stringToTerraform(this._nodeType),
notification_topic_arn: cdktf.stringToTerraform(this._notificationTopicArn),
num_cache_nodes: cdktf.numberToTerraform(this._numCacheNodes),
outpost_mode: cdktf.stringToTerraform(this._outpostMode),
parameter_group_name: cdktf.stringToTerraform(this._parameterGroupName),
port: cdktf.numberToTerraform(this._port),
preferred_availability_zones: cdktf.listMapper(cdktf.stringToTerraform, false)(this._preferredAvailabilityZones),
preferred_outpost_arn: cdktf.stringToTerraform(this._preferredOutpostArn),
region: cdktf.stringToTerraform(this._region),
replication_group_id: cdktf.stringToTerraform(this._replicationGroupId),
security_group_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(this._securityGroupIds),
snapshot_arns: cdktf.listMapper(cdktf.stringToTerraform, false)(this._snapshotArns),
snapshot_name: cdktf.stringToTerraform(this._snapshotName),
snapshot_retention_limit: cdktf.numberToTerraform(this._snapshotRetentionLimit),
snapshot_window: cdktf.stringToTerraform(this._snapshotWindow),
subnet_group_name: cdktf.stringToTerraform(this._subnetGroupName),
tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
transit_encryption_enabled: cdktf.booleanToTerraform(this._transitEncryptionEnabled),
log_delivery_configuration: cdktf.listMapper(elasticacheClusterLogDeliveryConfigurationToTerraform, true)(this._logDeliveryConfiguration.internalValue),
timeouts: elasticacheClusterTimeoutsToTerraform(this._timeouts.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
apply_immediately: {
value: cdktf.booleanToHclTerraform(this._applyImmediately),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
auto_minor_version_upgrade: {
value: cdktf.stringToHclTerraform(this._autoMinorVersionUpgrade),
isBlock: false,
type: "simple",
storageClassType: "string",
},
availability_zone: {
value: cdktf.stringToHclTerraform(this._availabilityZone),
isBlock: false,
type: "simple",
storageClassType: "string",
},
az_mode: {
value: cdktf.stringToHclTerraform(this._azMode),
isBlock: false,
type: "simple",
storageClassType: "string",
},
cluster_id: {
value: cdktf.stringToHclTerraform(this._clusterId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
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",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ip_discovery: {
value: cdktf.stringToHclTerraform(this._ipDiscovery),
isBlock: false,
type: "simple",
storageClassType: "string",
},
maintenance_window: {
value: cdktf.stringToHclTerraform(this._maintenanceWindow),
isBlock: false,
type: "simple",
storageClassType: "string",
},
network_type: {
value: cdktf.stringToHclTerraform(this._networkType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
node_type: {
value: cdktf.stringToHclTerraform(this._nodeType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
notification_topic_arn: {
value: cdktf.stringToHclTerraform(this._notificationTopicArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
num_cache_nodes: {
value: cdktf.numberToHclTerraform(this._numCacheNodes),
isBlock: false,
type: "simple",
storageClassType: "number",
},
outpost_mode: {
value: cdktf.stringToHclTerraform(this._outpostMode),
isBlock: false,
type: "simple",
storageClassType: "string",
},
parameter_group_name: {
value: cdktf.stringToHclTerraform(this._parameterGroupName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
port: {
value: cdktf.numberToHclTerraform(this._port),
isBlock: false,
type: "simple",
storageClassType: "number",
},
preferred_availability_zones: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._preferredAvailabilityZones),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
preferred_outpost_arn: {
value: cdktf.stringToHclTerraform(this._preferredOutpostArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
region: {
value: cdktf.stringToHclTerraform(this._region),
isBlock: false,
type: "simple",
storageClassType: "string",
},
replication_group_id: {
value: cdktf.stringToHclTerraform(this._replicationGroupId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
security_group_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._securityGroupIds),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
snapshot_arns: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._snapshotArns),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
snapshot_name: {
value: cdktf.stringToHclTerraform(this._snapshotName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
snapshot_retention_limit: {
value: cdktf.numberToHclTerraform(this._snapshotRetentionLimit),
isBlock: false,
type: "simple",
storageClassType: "number",
},
snapshot_window: {
value: cdktf.stringToHclTerraform(this._snapshotWindow),
isBlock: false,
type: "simple",
storageClassType: "string",
},
subnet_group_name: {
value: cdktf.stringToHclTerraform(this._subnetGroupName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
tags: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._tags),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
tags_all: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._tagsAll),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
transit_encryption_enabled: {
value: cdktf.booleanToHclTerraform(this._transitEncryptionEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
log_delivery_configuration: {
value: cdktf.listMapperHcl(elasticacheClusterLogDeliveryConfigurationToHclTerraform, true)(this._logDeliveryConfiguration.internalValue),
isBlock: true,
type: "set",
storageClassType: "ElasticacheClusterLogDeliveryConfigurationList",
},
timeouts: {
value: elasticacheClusterTimeoutsToHclTerraform(this._timeouts.internalValue),
isBlock: true,
type: "struct",
storageClassType: "ElasticacheClusterTimeouts",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
}
exports.ElasticacheCluster = ElasticacheCluster;
_f = JSII_RTTI_SYMBOL_1;
ElasticacheCluster[_f] = { fqn: "@cdktf/provider-aws.elasticacheCluster.ElasticacheCluster", version: "21.22.1" };
// =================
// STATIC PROPERTIES
// =================
ElasticacheCluster.tfResourceType = "aws_elasticache_cluster";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZWxhc3RpY2FjaGUtY2x1c3Rlci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBK0pBLDBGQU9DO0FBR0QsZ0dBUUM7QUE2RkQsc0hBV0M7QUFHRCw0SEFrQ0M7QUF1SkQsc0ZBVUM7QUFHRCw0RkE0QkM7O0FBcmZELCtCQUErQjtBQXNKL0IsU0FBZ0IsdUNBQXVDLENBQUMsTUFBcUM7SUFDM0YsSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDLElBQUksS0FBSyxDQUFDLFlBQVksQ0FBQyxZQUFZLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztRQUFDLE9BQU8sTUFBTSxDQUFD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