@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,150 lines • 162 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ElasticacheServerlessCache = exports.ElasticacheServerlessCacheTimeoutsOutputReference = exports.ElasticacheServerlessCacheCacheUsageLimitsList = exports.ElasticacheServerlessCacheCacheUsageLimitsOutputReference = exports.ElasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondList = exports.ElasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondOutputReference = exports.ElasticacheServerlessCacheCacheUsageLimitsDataStorageList = exports.ElasticacheServerlessCacheCacheUsageLimitsDataStorageOutputReference = exports.ElasticacheServerlessCacheReaderEndpointList = exports.ElasticacheServerlessCacheReaderEndpointOutputReference = exports.ElasticacheServerlessCacheEndpointList = exports.ElasticacheServerlessCacheEndpointOutputReference = void 0;
exports.elasticacheServerlessCacheEndpointToTerraform = elasticacheServerlessCacheEndpointToTerraform;
exports.elasticacheServerlessCacheEndpointToHclTerraform = elasticacheServerlessCacheEndpointToHclTerraform;
exports.elasticacheServerlessCacheReaderEndpointToTerraform = elasticacheServerlessCacheReaderEndpointToTerraform;
exports.elasticacheServerlessCacheReaderEndpointToHclTerraform = elasticacheServerlessCacheReaderEndpointToHclTerraform;
exports.elasticacheServerlessCacheCacheUsageLimitsDataStorageToTerraform = elasticacheServerlessCacheCacheUsageLimitsDataStorageToTerraform;
exports.elasticacheServerlessCacheCacheUsageLimitsDataStorageToHclTerraform = elasticacheServerlessCacheCacheUsageLimitsDataStorageToHclTerraform;
exports.elasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondToTerraform = elasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondToTerraform;
exports.elasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondToHclTerraform = elasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondToHclTerraform;
exports.elasticacheServerlessCacheCacheUsageLimitsToTerraform = elasticacheServerlessCacheCacheUsageLimitsToTerraform;
exports.elasticacheServerlessCacheCacheUsageLimitsToHclTerraform = elasticacheServerlessCacheCacheUsageLimitsToHclTerraform;
exports.elasticacheServerlessCacheTimeoutsToTerraform = elasticacheServerlessCacheTimeoutsToTerraform;
exports.elasticacheServerlessCacheTimeoutsToHclTerraform = elasticacheServerlessCacheTimeoutsToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function elasticacheServerlessCacheEndpointToTerraform(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 elasticacheServerlessCacheEndpointToHclTerraform(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 ElasticacheServerlessCacheEndpointOutputReference 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');
}
// port - computed: true, optional: false, required: false
get port() {
return this.getNumberAttribute('port');
}
}
exports.ElasticacheServerlessCacheEndpointOutputReference = ElasticacheServerlessCacheEndpointOutputReference;
_a = JSII_RTTI_SYMBOL_1;
ElasticacheServerlessCacheEndpointOutputReference[_a] = { fqn: "@cdktf/provider-aws.elasticacheServerlessCache.ElasticacheServerlessCacheEndpointOutputReference", version: "21.22.1" };
class ElasticacheServerlessCacheEndpointList 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 ElasticacheServerlessCacheEndpointOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ElasticacheServerlessCacheEndpointList = ElasticacheServerlessCacheEndpointList;
_b = JSII_RTTI_SYMBOL_1;
ElasticacheServerlessCacheEndpointList[_b] = { fqn: "@cdktf/provider-aws.elasticacheServerlessCache.ElasticacheServerlessCacheEndpointList", version: "21.22.1" };
function elasticacheServerlessCacheReaderEndpointToTerraform(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 elasticacheServerlessCacheReaderEndpointToHclTerraform(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 ElasticacheServerlessCacheReaderEndpointOutputReference 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');
}
// port - computed: true, optional: false, required: false
get port() {
return this.getNumberAttribute('port');
}
}
exports.ElasticacheServerlessCacheReaderEndpointOutputReference = ElasticacheServerlessCacheReaderEndpointOutputReference;
_c = JSII_RTTI_SYMBOL_1;
ElasticacheServerlessCacheReaderEndpointOutputReference[_c] = { fqn: "@cdktf/provider-aws.elasticacheServerlessCache.ElasticacheServerlessCacheReaderEndpointOutputReference", version: "21.22.1" };
class ElasticacheServerlessCacheReaderEndpointList 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 ElasticacheServerlessCacheReaderEndpointOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ElasticacheServerlessCacheReaderEndpointList = ElasticacheServerlessCacheReaderEndpointList;
_d = JSII_RTTI_SYMBOL_1;
ElasticacheServerlessCacheReaderEndpointList[_d] = { fqn: "@cdktf/provider-aws.elasticacheServerlessCache.ElasticacheServerlessCacheReaderEndpointList", version: "21.22.1" };
function elasticacheServerlessCacheCacheUsageLimitsDataStorageToTerraform(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 {
maximum: cdktf.numberToTerraform(struct.maximum),
minimum: cdktf.numberToTerraform(struct.minimum),
unit: cdktf.stringToTerraform(struct.unit),
};
}
function elasticacheServerlessCacheCacheUsageLimitsDataStorageToHclTerraform(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 = {
maximum: {
value: cdktf.numberToHclTerraform(struct.maximum),
isBlock: false,
type: "simple",
storageClassType: "number",
},
minimum: {
value: cdktf.numberToHclTerraform(struct.minimum),
isBlock: false,
type: "simple",
storageClassType: "number",
},
unit: {
value: cdktf.stringToHclTerraform(struct.unit),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ElasticacheServerlessCacheCacheUsageLimitsDataStorageOutputReference 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._maximum !== undefined) {
hasAnyValues = true;
internalValueResult.maximum = this._maximum;
}
if (this._minimum !== undefined) {
hasAnyValues = true;
internalValueResult.minimum = this._minimum;
}
if (this._unit !== undefined) {
hasAnyValues = true;
internalValueResult.unit = this._unit;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._maximum = undefined;
this._minimum = undefined;
this._unit = 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._maximum = value.maximum;
this._minimum = value.minimum;
this._unit = value.unit;
}
}
get maximum() {
return this.getNumberAttribute('maximum');
}
set maximum(value) {
this._maximum = value;
}
resetMaximum() {
this._maximum = undefined;
}
// Temporarily expose input value. Use with caution.
get maximumInput() {
return this._maximum;
}
get minimum() {
return this.getNumberAttribute('minimum');
}
set minimum(value) {
this._minimum = value;
}
resetMinimum() {
this._minimum = undefined;
}
// Temporarily expose input value. Use with caution.
get minimumInput() {
return this._minimum;
}
get unit() {
return this.getStringAttribute('unit');
}
set unit(value) {
this._unit = value;
}
// Temporarily expose input value. Use with caution.
get unitInput() {
return this._unit;
}
}
exports.ElasticacheServerlessCacheCacheUsageLimitsDataStorageOutputReference = ElasticacheServerlessCacheCacheUsageLimitsDataStorageOutputReference;
_e = JSII_RTTI_SYMBOL_1;
ElasticacheServerlessCacheCacheUsageLimitsDataStorageOutputReference[_e] = { fqn: "@cdktf/provider-aws.elasticacheServerlessCache.ElasticacheServerlessCacheCacheUsageLimitsDataStorageOutputReference", version: "21.22.1" };
class ElasticacheServerlessCacheCacheUsageLimitsDataStorageList 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 ElasticacheServerlessCacheCacheUsageLimitsDataStorageOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ElasticacheServerlessCacheCacheUsageLimitsDataStorageList = ElasticacheServerlessCacheCacheUsageLimitsDataStorageList;
_f = JSII_RTTI_SYMBOL_1;
ElasticacheServerlessCacheCacheUsageLimitsDataStorageList[_f] = { fqn: "@cdktf/provider-aws.elasticacheServerlessCache.ElasticacheServerlessCacheCacheUsageLimitsDataStorageList", version: "21.22.1" };
function elasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondToTerraform(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 {
maximum: cdktf.numberToTerraform(struct.maximum),
minimum: cdktf.numberToTerraform(struct.minimum),
};
}
function elasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondToHclTerraform(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 = {
maximum: {
value: cdktf.numberToHclTerraform(struct.maximum),
isBlock: false,
type: "simple",
storageClassType: "number",
},
minimum: {
value: cdktf.numberToHclTerraform(struct.minimum),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ElasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondOutputReference 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._maximum !== undefined) {
hasAnyValues = true;
internalValueResult.maximum = this._maximum;
}
if (this._minimum !== undefined) {
hasAnyValues = true;
internalValueResult.minimum = this._minimum;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._maximum = undefined;
this._minimum = 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._maximum = value.maximum;
this._minimum = value.minimum;
}
}
get maximum() {
return this.getNumberAttribute('maximum');
}
set maximum(value) {
this._maximum = value;
}
resetMaximum() {
this._maximum = undefined;
}
// Temporarily expose input value. Use with caution.
get maximumInput() {
return this._maximum;
}
get minimum() {
return this.getNumberAttribute('minimum');
}
set minimum(value) {
this._minimum = value;
}
resetMinimum() {
this._minimum = undefined;
}
// Temporarily expose input value. Use with caution.
get minimumInput() {
return this._minimum;
}
}
exports.ElasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondOutputReference = ElasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondOutputReference;
_g = JSII_RTTI_SYMBOL_1;
ElasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondOutputReference[_g] = { fqn: "@cdktf/provider-aws.elasticacheServerlessCache.ElasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondOutputReference", version: "21.22.1" };
class ElasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondList 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 ElasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ElasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondList = ElasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondList;
_h = JSII_RTTI_SYMBOL_1;
ElasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondList[_h] = { fqn: "@cdktf/provider-aws.elasticacheServerlessCache.ElasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondList", version: "21.22.1" };
function elasticacheServerlessCacheCacheUsageLimitsToTerraform(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 {
data_storage: cdktf.listMapper(elasticacheServerlessCacheCacheUsageLimitsDataStorageToTerraform, true)(struct.dataStorage),
ecpu_per_second: cdktf.listMapper(elasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondToTerraform, true)(struct.ecpuPerSecond),
};
}
function elasticacheServerlessCacheCacheUsageLimitsToHclTerraform(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 = {
data_storage: {
value: cdktf.listMapperHcl(elasticacheServerlessCacheCacheUsageLimitsDataStorageToHclTerraform, true)(struct.dataStorage),
isBlock: true,
type: "list",
storageClassType: "ElasticacheServerlessCacheCacheUsageLimitsDataStorageList",
},
ecpu_per_second: {
value: cdktf.listMapperHcl(elasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondToHclTerraform, true)(struct.ecpuPerSecond),
isBlock: true,
type: "list",
storageClassType: "ElasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ElasticacheServerlessCacheCacheUsageLimitsOutputReference 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;
// data_storage - computed: false, optional: true, required: false
this._dataStorage = new ElasticacheServerlessCacheCacheUsageLimitsDataStorageList(this, "data_storage", false);
// ecpu_per_second - computed: false, optional: true, required: false
this._ecpuPerSecond = new ElasticacheServerlessCacheCacheUsageLimitsEcpuPerSecondList(this, "ecpu_per_second", false);
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._dataStorage?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.dataStorage = this._dataStorage?.internalValue;
}
if (this._ecpuPerSecond?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.ecpuPerSecond = this._ecpuPerSecond?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._dataStorage.internalValue = undefined;
this._ecpuPerSecond.internalValue = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._dataStorage.internalValue = value.dataStorage;
this._ecpuPerSecond.internalValue = value.ecpuPerSecond;
}
}
get dataStorage() {
return this._dataStorage;
}
putDataStorage(value) {
this._dataStorage.internalValue = value;
}
resetDataStorage() {
this._dataStorage.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get dataStorageInput() {
return this._dataStorage.internalValue;
}
get ecpuPerSecond() {
return this._ecpuPerSecond;
}
putEcpuPerSecond(value) {
this._ecpuPerSecond.internalValue = value;
}
resetEcpuPerSecond() {
this._ecpuPerSecond.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get ecpuPerSecondInput() {
return this._ecpuPerSecond.internalValue;
}
}
exports.ElasticacheServerlessCacheCacheUsageLimitsOutputReference = ElasticacheServerlessCacheCacheUsageLimitsOutputReference;
_j = JSII_RTTI_SYMBOL_1;
ElasticacheServerlessCacheCacheUsageLimitsOutputReference[_j] = { fqn: "@cdktf/provider-aws.elasticacheServerlessCache.ElasticacheServerlessCacheCacheUsageLimitsOutputReference", version: "21.22.1" };
class ElasticacheServerlessCacheCacheUsageLimitsList 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 ElasticacheServerlessCacheCacheUsageLimitsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ElasticacheServerlessCacheCacheUsageLimitsList = ElasticacheServerlessCacheCacheUsageLimitsList;
_k = JSII_RTTI_SYMBOL_1;
ElasticacheServerlessCacheCacheUsageLimitsList[_k] = { fqn: "@cdktf/provider-aws.elasticacheServerlessCache.ElasticacheServerlessCacheCacheUsageLimitsList", version: "21.22.1" };
function elasticacheServerlessCacheTimeoutsToTerraform(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 elasticacheServerlessCacheTimeoutsToHclTerraform(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 ElasticacheServerlessCacheTimeoutsOutputReference 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.ElasticacheServerlessCacheTimeoutsOutputReference = ElasticacheServerlessCacheTimeoutsOutputReference;
_l = JSII_RTTI_SYMBOL_1;
ElasticacheServerlessCacheTimeoutsOutputReference[_l] = { fqn: "@cdktf/provider-aws.elasticacheServerlessCache.ElasticacheServerlessCacheTimeoutsOutputReference", version: "21.22.1" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/elasticache_serverless_cache aws_elasticache_serverless_cache}
*/
class ElasticacheServerlessCache extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a ElasticacheServerlessCache 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 ElasticacheServerlessCache to import
* @param importFromId The id of the existing ElasticacheServerlessCache that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/elasticache_serverless_cache#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the ElasticacheServerlessCache to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_elasticache_serverless_cache", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/elasticache_serverless_cache aws_elasticache_serverless_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 ElasticacheServerlessCacheConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'aws_elasticache_serverless_cache',
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
});
// endpoint - computed: true, optional: false, required: false
this._endpoint = new ElasticacheServerlessCacheEndpointList(this, "endpoint", false);
// reader_endpoint - computed: true, optional: false, required: false
this._readerEndpoint = new ElasticacheServerlessCacheReaderEndpointList(this, "reader_endpoint", false);
// tags_all - computed: true, optional: false, required: false
this._tagsAll = new cdktf.StringMap(this, "tags_all");
// cache_usage_limits - computed: false, optional: true, required: false
this._cacheUsageLimits = new ElasticacheServerlessCacheCacheUsageLimitsList(this, "cache_usage_limits", false);
// timeouts - computed: false, optional: true, required: false
this._timeouts = new ElasticacheServerlessCacheTimeoutsOutputReference(this, "timeouts");
this._dailySnapshotTime = config.dailySnapshotTime;
this._description = config.description;
this._engine = config.engine;
this._kmsKeyId = config.kmsKeyId;
this._majorEngineVersion = config.majorEngineVersion;
this._name = config.name;
this._region = config.region;
this._securityGroupIds = config.securityGroupIds;
this._snapshotArnsToRestore = config.snapshotArnsToRestore;
this._snapshotRetentionLimit = config.snapshotRetentionLimit;
this._subnetIds = config.subnetIds;
this._tags = config.tags;
this._userGroupId = config.userGroupId;
this._cacheUsageLimits.internalValue = config.cacheUsageLimits;
this._timeouts.internalValue = config.timeouts;
}
// ==========
// ATTRIBUTES
// ==========
// arn - computed: true, optional: false, required: false
get arn() {
return this.getStringAttribute('arn');
}
// create_time - computed: true, optional: false, required: false
get createTime() {
return this.getStringAttribute('create_time');
}
get dailySnapshotTime() {
return this.getStringAttribute('daily_snapshot_time');
}
set dailySnapshotTime(value) {
this._dailySnapshotTime = value;
}
resetDailySnapshotTime() {
this._dailySnapshotTime = undefined;
}
// Temporarily expose input value. Use with caution.
get dailySnapshotTimeInput() {
return this._dailySnapshotTime;
}
get description() {
return this.getStringAttribute('description');
}
set description(value) {
this._description = value;
}
resetDescription() {
this._description = undefined;
}
// Temporarily expose input value. Use with caution.
get descriptionInput() {
return this._description;
}
get endpoint() {
return this._endpoint;
}
get engine() {
return this.getStringAttribute('engine');
}
set engine(value) {
this._engine = value;
}
// Temporarily expose input value. Use with caution.
get engineInput() {
return this._engine;
}
// full_engine_version - computed: true, optional: false, required: false
get fullEngineVersion() {
return this.getStringAttribute('full_engine_version');
}
// id - computed: true, optional: false, required: false
get id() {
return this.getStringAttribute('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 majorEngineVersion() {
return this.getStringAttribute('major_engine_version');
}
set majorEngineVersion(value) {
this._majorEngineVersion = value;
}
resetMajorEngineVersion() {
this._majorEngineVersion = undefined;
}
// Temporarily expose input value. Use with caution.
get majorEngineVersionInput() {
return this._majorEngineVersion;
}
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 readerEndpoint() {
return this._readerEndpoint;
}
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 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 snapshotArnsToRestore() {
return this.getListAttribute('snapshot_arns_to_restore');
}
set snapshotArnsToRestore(value) {
this._snapshotArnsToRestore = value;
}
resetSnapshotArnsToRestore() {
this._snapshotArnsToRestore = undefined;
}
// Temporarily expose input value. Use with caution.
get snapshotArnsToRestoreInput() {
return this._snapshotArnsToRestore;
}
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;
}
// status - computed: true, optional: false, required: false
get status() {
return this.getStringAttribute('status');
}
get subnetIds() {
return cdktf.Fn.tolist(this.getListAttribute('subnet_ids'));
}
set subnetIds(value) {
this._subnetIds = value;
}
resetSubnetIds() {
this._subnetIds = undefined;
}
// Temporarily expose input value. Use with caution.
get subnetIdsInput() {
return this._subnetIds;
}
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._tagsAll;
}
get userGroupId() {
return this.getStringAttribute('user_group_id');
}
set userGroupId(value) {
this._userGroupId = value;
}
resetUserGroupId() {
this._userGroupId = undefined;
}
// Temporarily expose input value. Use with caution.
get userGroupIdInput() {
return this._userGroupId;
}
get cacheUsageLimits() {
return this._cacheUsageLimits;
}
putCacheUsageLimits(value) {
this._cacheUsageLimits.internalValue = value;
}
resetCacheUsageLimits() {
this._cacheUsageLimits.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get cacheUsageLimitsInput() {
return this._cacheUsageLimits.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 {
daily_snapshot_time: cdktf.stringToTerraform(this._dailySnapshotTime),
description: cdktf.stringToTerraform(this._description),
engine: cdktf.stringToTerraform(this._engine),
kms_key_id: cdktf.stringToTerraform(this._kmsKeyId),
major_engine_version: cdktf.stringToTerraform(this._majorEngineVersion),
name: cdktf.stringToTerraform(this._name),
region: cdktf.stringToTerraform(this._region),
security_group_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(this._securityGroupIds),
snapshot_arns_to_restore: cdktf.listMapper(cdktf.stringToTerraform, false)(this._snapshotArnsToRestore),
snapshot_retention_limit: cdktf.numberToTerraform(this._snapshotRetentionLimit),
subnet_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(this._subnetIds),
tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
user_group_id: cdktf.stringToTerraform(this._userGroupId),
cache_usage_limits: cdktf.listMapper(elasticacheServerlessCacheCacheUsageLimitsToTerraform, true)(this._cacheUsageLimits.internalValue),
timeouts: elasticacheServerlessCacheTimeoutsToTerraform(this._timeouts.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
daily_snapshot_time: {
value: cdktf.stringToHclTerraform(this._dailySnapshotTime),
isBlock: false,
type: "simple",
storageClassType: "string",
},
description: {
value: cdktf.stringToHclTerraform(this._description),
isBlock: false,
type: "simple",
storageClassType: "string",
},
engine: {
value: cdktf.stringToHclTerraform(this._engine),
isBlock: false,
type: "simple",
storageClassType: "string",
},
kms_key_id: {
value: cdktf.stringToHclTerraform(this._kmsKeyId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
major_engine_version: {
value: cdktf.stringToHclTerraform(this._majorEngineVersion),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(this._name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
region: {
value: cdktf.stringToHclTerraform(this._region),
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_to_restore: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._snapshotArnsToRestore),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
snapshot_retention_limit: {
value: cdktf.numberToHclTerraform(this._snapshotRetentionLimit),
isBlock: false,
type: "simple",
storageClassType: "number",
},
subnet_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._subnetIds),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
tags: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._tags),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
user_group_id: {
value: cdktf.stringToHclTerraform(this._userGroupId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
cache_usage_limits: {
value: cdktf.listMapperHcl(elasticacheServerlessCacheCacheUsageLimitsToHclTerraform, true)(this._cacheUsageLimits.internalValue),
isBlock: true,
type: "list",
storageClassType: "ElasticacheServerlessCacheCacheUsageLimitsList",
},
timeouts: {
value: elasticacheServerlessCacheTimeoutsToHclTerraform(this._timeouts.internalValue),
isBlock: true,
type: "struct",
storageClassType: "ElasticacheServerlessCacheTimeouts",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
}
exports.ElasticacheServerlessCache = ElasticacheServerlessCache;
_m = JSII_RTTI_SYMBOL_1;
ElasticacheServerlessCache[_m] = { fqn: "@cdktf/provider-aws.elasticacheServerlessCache.ElasticacheServerlessCache", version: "21.22.1" };
// =================
// STATIC PROPERTIES
// =================
ElasticacheServerlessCache.tfResourceType = "aws_elasticache_serverless_cache";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZWxhc3RpY2FjaGUtc2VydmVybGVzcy1jYWNoZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBb0ZBLHNHQU9DO0FBR0QsNEdBUUM7QUE4REQsa0hBT0M7QUFHRCx3SEFRQztBQTBFRCw0SUFVQztBQUdELGtKQTRCQztBQXNJRCxnSkFTQztBQUdELHNKQXNCQztBQXVIRCxzSEFTQztBQUdELDRIQXNCQztBQTZIRCxzR0FVQztBQUdELDRHQTRCQzs7QUF2d0JELCtCQUErQjtBQTJFL0IsU0FBZ0IsNkNBQTZDLENBQUMsTUFBMkM7SUFDdkcsSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDLElBQUksS0FBSyxDQUFDLFlBQVksQ0FBQyxZQUFZLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztRQUFDLE9BQU8sTUFBTSxDQUFDO0lBQUMsQ0FBQztJQUM1RixJQUFJLEtBQUssQ0FBQyxnQkFBZ0IsQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDO1FBQ25DLE1BQU0sSUFBSSxLQUFLLENBQUMsb0hBQW9ILENBQUMsQ0FBQztJQUN4SSxDQUFDO0lBQ0QsT0FBTyxFQUNOLENBQUE7QUFDSCxDQUFDO0FBR0QsU0FBZ0IsZ0RBQWdELENBQUMsTUFBMkM7SUFDMUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDLElBQUksS0FBSyxDQUFDLFlBQVksQ0FBQyx