@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,159 lines (1,158 loc) • 352 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DynamodbTable = exports.DynamodbTableTtlOutputReference = exports.dynamodbTableTtlToHclTerraform = exports.dynamodbTableTtlToTerraform = exports.DynamodbTableTimeoutsOutputReference = exports.dynamodbTableTimeoutsToHclTerraform = exports.dynamodbTableTimeoutsToTerraform = exports.DynamodbTableServerSideEncryptionOutputReference = exports.dynamodbTableServerSideEncryptionToHclTerraform = exports.dynamodbTableServerSideEncryptionToTerraform = exports.DynamodbTableReplicaList = exports.DynamodbTableReplicaOutputReference = exports.dynamodbTableReplicaToHclTerraform = exports.dynamodbTableReplicaToTerraform = exports.DynamodbTablePointInTimeRecoveryOutputReference = exports.dynamodbTablePointInTimeRecoveryToHclTerraform = exports.dynamodbTablePointInTimeRecoveryToTerraform = exports.DynamodbTableOnDemandThroughputOutputReference = exports.dynamodbTableOnDemandThroughputToHclTerraform = exports.dynamodbTableOnDemandThroughputToTerraform = exports.DynamodbTableLocalSecondaryIndexList = exports.DynamodbTableLocalSecondaryIndexOutputReference = exports.dynamodbTableLocalSecondaryIndexToHclTerraform = exports.dynamodbTableLocalSecondaryIndexToTerraform = exports.DynamodbTableImportTableOutputReference = exports.dynamodbTableImportTableToHclTerraform = exports.dynamodbTableImportTableToTerraform = exports.DynamodbTableImportTableS3BucketSourceOutputReference = exports.dynamodbTableImportTableS3BucketSourceToHclTerraform = exports.dynamodbTableImportTableS3BucketSourceToTerraform = exports.DynamodbTableImportTableInputFormatOptionsOutputReference = exports.dynamodbTableImportTableInputFormatOptionsToHclTerraform = exports.dynamodbTableImportTableInputFormatOptionsToTerraform = exports.DynamodbTableImportTableInputFormatOptionsCsvOutputReference = exports.dynamodbTableImportTableInputFormatOptionsCsvToHclTerraform = exports.dynamodbTableImportTableInputFormatOptionsCsvToTerraform = exports.DynamodbTableGlobalSecondaryIndexList = exports.DynamodbTableGlobalSecondaryIndexOutputReference = exports.dynamodbTableGlobalSecondaryIndexToHclTerraform = exports.dynamodbTableGlobalSecondaryIndexToTerraform = exports.DynamodbTableGlobalSecondaryIndexOnDemandThroughputOutputReference = exports.dynamodbTableGlobalSecondaryIndexOnDemandThroughputToHclTerraform = exports.dynamodbTableGlobalSecondaryIndexOnDemandThroughputToTerraform = exports.DynamodbTableAttributeList = exports.DynamodbTableAttributeOutputReference = exports.dynamodbTableAttributeToHclTerraform = exports.dynamodbTableAttributeToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function dynamodbTableAttributeToTerraform(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 {
name: cdktf.stringToTerraform(struct.name),
type: cdktf.stringToTerraform(struct.type),
};
}
exports.dynamodbTableAttributeToTerraform = dynamodbTableAttributeToTerraform;
function dynamodbTableAttributeToHclTerraform(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 = {
name: {
value: cdktf.stringToHclTerraform(struct.name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
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.dynamodbTableAttributeToHclTerraform = dynamodbTableAttributeToHclTerraform;
class DynamodbTableAttributeOutputReference 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._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
if (this._type !== undefined) {
hasAnyValues = true;
internalValueResult.type = this._type;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._name = undefined;
this._type = 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._name = value.name;
this._type = value.type;
}
}
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 type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
}
exports.DynamodbTableAttributeOutputReference = DynamodbTableAttributeOutputReference;
_a = JSII_RTTI_SYMBOL_1;
DynamodbTableAttributeOutputReference[_a] = { fqn: "@cdktf/provider-aws.dynamodbTable.DynamodbTableAttributeOutputReference", version: "19.50.0" };
class DynamodbTableAttributeList 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 DynamodbTableAttributeOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.DynamodbTableAttributeList = DynamodbTableAttributeList;
_b = JSII_RTTI_SYMBOL_1;
DynamodbTableAttributeList[_b] = { fqn: "@cdktf/provider-aws.dynamodbTable.DynamodbTableAttributeList", version: "19.50.0" };
function dynamodbTableGlobalSecondaryIndexOnDemandThroughputToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
max_read_request_units: cdktf.numberToTerraform(struct.maxReadRequestUnits),
max_write_request_units: cdktf.numberToTerraform(struct.maxWriteRequestUnits),
};
}
exports.dynamodbTableGlobalSecondaryIndexOnDemandThroughputToTerraform = dynamodbTableGlobalSecondaryIndexOnDemandThroughputToTerraform;
function dynamodbTableGlobalSecondaryIndexOnDemandThroughputToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
max_read_request_units: {
value: cdktf.numberToHclTerraform(struct.maxReadRequestUnits),
isBlock: false,
type: "simple",
storageClassType: "number",
},
max_write_request_units: {
value: cdktf.numberToHclTerraform(struct.maxWriteRequestUnits),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dynamodbTableGlobalSecondaryIndexOnDemandThroughputToHclTerraform = dynamodbTableGlobalSecondaryIndexOnDemandThroughputToHclTerraform;
class DynamodbTableGlobalSecondaryIndexOnDemandThroughputOutputReference 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._maxReadRequestUnits !== undefined) {
hasAnyValues = true;
internalValueResult.maxReadRequestUnits = this._maxReadRequestUnits;
}
if (this._maxWriteRequestUnits !== undefined) {
hasAnyValues = true;
internalValueResult.maxWriteRequestUnits = this._maxWriteRequestUnits;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._maxReadRequestUnits = undefined;
this._maxWriteRequestUnits = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._maxReadRequestUnits = value.maxReadRequestUnits;
this._maxWriteRequestUnits = value.maxWriteRequestUnits;
}
}
get maxReadRequestUnits() {
return this.getNumberAttribute('max_read_request_units');
}
set maxReadRequestUnits(value) {
this._maxReadRequestUnits = value;
}
resetMaxReadRequestUnits() {
this._maxReadRequestUnits = undefined;
}
// Temporarily expose input value. Use with caution.
get maxReadRequestUnitsInput() {
return this._maxReadRequestUnits;
}
get maxWriteRequestUnits() {
return this.getNumberAttribute('max_write_request_units');
}
set maxWriteRequestUnits(value) {
this._maxWriteRequestUnits = value;
}
resetMaxWriteRequestUnits() {
this._maxWriteRequestUnits = undefined;
}
// Temporarily expose input value. Use with caution.
get maxWriteRequestUnitsInput() {
return this._maxWriteRequestUnits;
}
}
exports.DynamodbTableGlobalSecondaryIndexOnDemandThroughputOutputReference = DynamodbTableGlobalSecondaryIndexOnDemandThroughputOutputReference;
_c = JSII_RTTI_SYMBOL_1;
DynamodbTableGlobalSecondaryIndexOnDemandThroughputOutputReference[_c] = { fqn: "@cdktf/provider-aws.dynamodbTable.DynamodbTableGlobalSecondaryIndexOnDemandThroughputOutputReference", version: "19.50.0" };
function dynamodbTableGlobalSecondaryIndexToTerraform(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 {
hash_key: cdktf.stringToTerraform(struct.hashKey),
name: cdktf.stringToTerraform(struct.name),
non_key_attributes: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.nonKeyAttributes),
projection_type: cdktf.stringToTerraform(struct.projectionType),
range_key: cdktf.stringToTerraform(struct.rangeKey),
read_capacity: cdktf.numberToTerraform(struct.readCapacity),
write_capacity: cdktf.numberToTerraform(struct.writeCapacity),
on_demand_throughput: dynamodbTableGlobalSecondaryIndexOnDemandThroughputToTerraform(struct.onDemandThroughput),
};
}
exports.dynamodbTableGlobalSecondaryIndexToTerraform = dynamodbTableGlobalSecondaryIndexToTerraform;
function dynamodbTableGlobalSecondaryIndexToHclTerraform(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 = {
hash_key: {
value: cdktf.stringToHclTerraform(struct.hashKey),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(struct.name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
non_key_attributes: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.nonKeyAttributes),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
projection_type: {
value: cdktf.stringToHclTerraform(struct.projectionType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
range_key: {
value: cdktf.stringToHclTerraform(struct.rangeKey),
isBlock: false,
type: "simple",
storageClassType: "string",
},
read_capacity: {
value: cdktf.numberToHclTerraform(struct.readCapacity),
isBlock: false,
type: "simple",
storageClassType: "number",
},
write_capacity: {
value: cdktf.numberToHclTerraform(struct.writeCapacity),
isBlock: false,
type: "simple",
storageClassType: "number",
},
on_demand_throughput: {
value: dynamodbTableGlobalSecondaryIndexOnDemandThroughputToHclTerraform(struct.onDemandThroughput),
isBlock: true,
type: "list",
storageClassType: "DynamodbTableGlobalSecondaryIndexOnDemandThroughputList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dynamodbTableGlobalSecondaryIndexToHclTerraform = dynamodbTableGlobalSecondaryIndexToHclTerraform;
class DynamodbTableGlobalSecondaryIndexOutputReference 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;
// on_demand_throughput - computed: false, optional: true, required: false
this._onDemandThroughput = new DynamodbTableGlobalSecondaryIndexOnDemandThroughputOutputReference(this, "on_demand_throughput");
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._hashKey !== undefined) {
hasAnyValues = true;
internalValueResult.hashKey = this._hashKey;
}
if (this._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
if (this._nonKeyAttributes !== undefined) {
hasAnyValues = true;
internalValueResult.nonKeyAttributes = this._nonKeyAttributes;
}
if (this._projectionType !== undefined) {
hasAnyValues = true;
internalValueResult.projectionType = this._projectionType;
}
if (this._rangeKey !== undefined) {
hasAnyValues = true;
internalValueResult.rangeKey = this._rangeKey;
}
if (this._readCapacity !== undefined) {
hasAnyValues = true;
internalValueResult.readCapacity = this._readCapacity;
}
if (this._writeCapacity !== undefined) {
hasAnyValues = true;
internalValueResult.writeCapacity = this._writeCapacity;
}
if (this._onDemandThroughput?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.onDemandThroughput = this._onDemandThroughput?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._hashKey = undefined;
this._name = undefined;
this._nonKeyAttributes = undefined;
this._projectionType = undefined;
this._rangeKey = undefined;
this._readCapacity = undefined;
this._writeCapacity = undefined;
this._onDemandThroughput.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._hashKey = value.hashKey;
this._name = value.name;
this._nonKeyAttributes = value.nonKeyAttributes;
this._projectionType = value.projectionType;
this._rangeKey = value.rangeKey;
this._readCapacity = value.readCapacity;
this._writeCapacity = value.writeCapacity;
this._onDemandThroughput.internalValue = value.onDemandThroughput;
}
}
get hashKey() {
return this.getStringAttribute('hash_key');
}
set hashKey(value) {
this._hashKey = value;
}
// Temporarily expose input value. Use with caution.
get hashKeyInput() {
return this._hashKey;
}
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 nonKeyAttributes() {
return cdktf.Fn.tolist(this.getListAttribute('non_key_attributes'));
}
set nonKeyAttributes(value) {
this._nonKeyAttributes = value;
}
resetNonKeyAttributes() {
this._nonKeyAttributes = undefined;
}
// Temporarily expose input value. Use with caution.
get nonKeyAttributesInput() {
return this._nonKeyAttributes;
}
get projectionType() {
return this.getStringAttribute('projection_type');
}
set projectionType(value) {
this._projectionType = value;
}
// Temporarily expose input value. Use with caution.
get projectionTypeInput() {
return this._projectionType;
}
get rangeKey() {
return this.getStringAttribute('range_key');
}
set rangeKey(value) {
this._rangeKey = value;
}
resetRangeKey() {
this._rangeKey = undefined;
}
// Temporarily expose input value. Use with caution.
get rangeKeyInput() {
return this._rangeKey;
}
get readCapacity() {
return this.getNumberAttribute('read_capacity');
}
set readCapacity(value) {
this._readCapacity = value;
}
resetReadCapacity() {
this._readCapacity = undefined;
}
// Temporarily expose input value. Use with caution.
get readCapacityInput() {
return this._readCapacity;
}
get writeCapacity() {
return this.getNumberAttribute('write_capacity');
}
set writeCapacity(value) {
this._writeCapacity = value;
}
resetWriteCapacity() {
this._writeCapacity = undefined;
}
// Temporarily expose input value. Use with caution.
get writeCapacityInput() {
return this._writeCapacity;
}
get onDemandThroughput() {
return this._onDemandThroughput;
}
putOnDemandThroughput(value) {
this._onDemandThroughput.internalValue = value;
}
resetOnDemandThroughput() {
this._onDemandThroughput.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get onDemandThroughputInput() {
return this._onDemandThroughput.internalValue;
}
}
exports.DynamodbTableGlobalSecondaryIndexOutputReference = DynamodbTableGlobalSecondaryIndexOutputReference;
_d = JSII_RTTI_SYMBOL_1;
DynamodbTableGlobalSecondaryIndexOutputReference[_d] = { fqn: "@cdktf/provider-aws.dynamodbTable.DynamodbTableGlobalSecondaryIndexOutputReference", version: "19.50.0" };
class DynamodbTableGlobalSecondaryIndexList 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 DynamodbTableGlobalSecondaryIndexOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.DynamodbTableGlobalSecondaryIndexList = DynamodbTableGlobalSecondaryIndexList;
_e = JSII_RTTI_SYMBOL_1;
DynamodbTableGlobalSecondaryIndexList[_e] = { fqn: "@cdktf/provider-aws.dynamodbTable.DynamodbTableGlobalSecondaryIndexList", version: "19.50.0" };
function dynamodbTableImportTableInputFormatOptionsCsvToTerraform(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 {
delimiter: cdktf.stringToTerraform(struct.delimiter),
header_list: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.headerList),
};
}
exports.dynamodbTableImportTableInputFormatOptionsCsvToTerraform = dynamodbTableImportTableInputFormatOptionsCsvToTerraform;
function dynamodbTableImportTableInputFormatOptionsCsvToHclTerraform(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 = {
delimiter: {
value: cdktf.stringToHclTerraform(struct.delimiter),
isBlock: false,
type: "simple",
storageClassType: "string",
},
header_list: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.headerList),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dynamodbTableImportTableInputFormatOptionsCsvToHclTerraform = dynamodbTableImportTableInputFormatOptionsCsvToHclTerraform;
class DynamodbTableImportTableInputFormatOptionsCsvOutputReference 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._delimiter !== undefined) {
hasAnyValues = true;
internalValueResult.delimiter = this._delimiter;
}
if (this._headerList !== undefined) {
hasAnyValues = true;
internalValueResult.headerList = this._headerList;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._delimiter = undefined;
this._headerList = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._delimiter = value.delimiter;
this._headerList = value.headerList;
}
}
get delimiter() {
return this.getStringAttribute('delimiter');
}
set delimiter(value) {
this._delimiter = value;
}
resetDelimiter() {
this._delimiter = undefined;
}
// Temporarily expose input value. Use with caution.
get delimiterInput() {
return this._delimiter;
}
get headerList() {
return cdktf.Fn.tolist(this.getListAttribute('header_list'));
}
set headerList(value) {
this._headerList = value;
}
resetHeaderList() {
this._headerList = undefined;
}
// Temporarily expose input value. Use with caution.
get headerListInput() {
return this._headerList;
}
}
exports.DynamodbTableImportTableInputFormatOptionsCsvOutputReference = DynamodbTableImportTableInputFormatOptionsCsvOutputReference;
_f = JSII_RTTI_SYMBOL_1;
DynamodbTableImportTableInputFormatOptionsCsvOutputReference[_f] = { fqn: "@cdktf/provider-aws.dynamodbTable.DynamodbTableImportTableInputFormatOptionsCsvOutputReference", version: "19.50.0" };
function dynamodbTableImportTableInputFormatOptionsToTerraform(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 {
csv: dynamodbTableImportTableInputFormatOptionsCsvToTerraform(struct.csv),
};
}
exports.dynamodbTableImportTableInputFormatOptionsToTerraform = dynamodbTableImportTableInputFormatOptionsToTerraform;
function dynamodbTableImportTableInputFormatOptionsToHclTerraform(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 = {
csv: {
value: dynamodbTableImportTableInputFormatOptionsCsvToHclTerraform(struct.csv),
isBlock: true,
type: "list",
storageClassType: "DynamodbTableImportTableInputFormatOptionsCsvList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dynamodbTableImportTableInputFormatOptionsToHclTerraform = dynamodbTableImportTableInputFormatOptionsToHclTerraform;
class DynamodbTableImportTableInputFormatOptionsOutputReference 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;
// csv - computed: false, optional: true, required: false
this._csv = new DynamodbTableImportTableInputFormatOptionsCsvOutputReference(this, "csv");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._csv?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.csv = this._csv?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._csv.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._csv.internalValue = value.csv;
}
}
get csv() {
return this._csv;
}
putCsv(value) {
this._csv.internalValue = value;
}
resetCsv() {
this._csv.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get csvInput() {
return this._csv.internalValue;
}
}
exports.DynamodbTableImportTableInputFormatOptionsOutputReference = DynamodbTableImportTableInputFormatOptionsOutputReference;
_g = JSII_RTTI_SYMBOL_1;
DynamodbTableImportTableInputFormatOptionsOutputReference[_g] = { fqn: "@cdktf/provider-aws.dynamodbTable.DynamodbTableImportTableInputFormatOptionsOutputReference", version: "19.50.0" };
function dynamodbTableImportTableS3BucketSourceToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
bucket: cdktf.stringToTerraform(struct.bucket),
bucket_owner: cdktf.stringToTerraform(struct.bucketOwner),
key_prefix: cdktf.stringToTerraform(struct.keyPrefix),
};
}
exports.dynamodbTableImportTableS3BucketSourceToTerraform = dynamodbTableImportTableS3BucketSourceToTerraform;
function dynamodbTableImportTableS3BucketSourceToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
bucket: {
value: cdktf.stringToHclTerraform(struct.bucket),
isBlock: false,
type: "simple",
storageClassType: "string",
},
bucket_owner: {
value: cdktf.stringToHclTerraform(struct.bucketOwner),
isBlock: false,
type: "simple",
storageClassType: "string",
},
key_prefix: {
value: cdktf.stringToHclTerraform(struct.keyPrefix),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dynamodbTableImportTableS3BucketSourceToHclTerraform = dynamodbTableImportTableS3BucketSourceToHclTerraform;
class DynamodbTableImportTableS3BucketSourceOutputReference 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._bucket !== undefined) {
hasAnyValues = true;
internalValueResult.bucket = this._bucket;
}
if (this._bucketOwner !== undefined) {
hasAnyValues = true;
internalValueResult.bucketOwner = this._bucketOwner;
}
if (this._keyPrefix !== undefined) {
hasAnyValues = true;
internalValueResult.keyPrefix = this._keyPrefix;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._bucket = undefined;
this._bucketOwner = undefined;
this._keyPrefix = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._bucket = value.bucket;
this._bucketOwner = value.bucketOwner;
this._keyPrefix = value.keyPrefix;
}
}
get bucket() {
return this.getStringAttribute('bucket');
}
set bucket(value) {
this._bucket = value;
}
// Temporarily expose input value. Use with caution.
get bucketInput() {
return this._bucket;
}
get bucketOwner() {
return this.getStringAttribute('bucket_owner');
}
set bucketOwner(value) {
this._bucketOwner = value;
}
resetBucketOwner() {
this._bucketOwner = undefined;
}
// Temporarily expose input value. Use with caution.
get bucketOwnerInput() {
return this._bucketOwner;
}
get keyPrefix() {
return this.getStringAttribute('key_prefix');
}
set keyPrefix(value) {
this._keyPrefix = value;
}
resetKeyPrefix() {
this._keyPrefix = undefined;
}
// Temporarily expose input value. Use with caution.
get keyPrefixInput() {
return this._keyPrefix;
}
}
exports.DynamodbTableImportTableS3BucketSourceOutputReference = DynamodbTableImportTableS3BucketSourceOutputReference;
_h = JSII_RTTI_SYMBOL_1;
DynamodbTableImportTableS3BucketSourceOutputReference[_h] = { fqn: "@cdktf/provider-aws.dynamodbTable.DynamodbTableImportTableS3BucketSourceOutputReference", version: "19.50.0" };
function dynamodbTableImportTableToTerraform(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 {
input_compression_type: cdktf.stringToTerraform(struct.inputCompressionType),
input_format: cdktf.stringToTerraform(struct.inputFormat),
input_format_options: dynamodbTableImportTableInputFormatOptionsToTerraform(struct.inputFormatOptions),
s3_bucket_source: dynamodbTableImportTableS3BucketSourceToTerraform(struct.s3BucketSource),
};
}
exports.dynamodbTableImportTableToTerraform = dynamodbTableImportTableToTerraform;
function dynamodbTableImportTableToHclTerraform(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 = {
input_compression_type: {
value: cdktf.stringToHclTerraform(struct.inputCompressionType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
input_format: {
value: cdktf.stringToHclTerraform(struct.inputFormat),
isBlock: false,
type: "simple",
storageClassType: "string",
},
input_format_options: {
value: dynamodbTableImportTableInputFormatOptionsToHclTerraform(struct.inputFormatOptions),
isBlock: true,
type: "list",
storageClassType: "DynamodbTableImportTableInputFormatOptionsList",
},
s3_bucket_source: {
value: dynamodbTableImportTableS3BucketSourceToHclTerraform(struct.s3BucketSource),
isBlock: true,
type: "list",
storageClassType: "DynamodbTableImportTableS3BucketSourceList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dynamodbTableImportTableToHclTerraform = dynamodbTableImportTableToHclTerraform;
class DynamodbTableImportTableOutputReference 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;
// input_format_options - computed: false, optional: true, required: false
this._inputFormatOptions = new DynamodbTableImportTableInputFormatOptionsOutputReference(this, "input_format_options");
// s3_bucket_source - computed: false, optional: false, required: true
this._s3BucketSource = new DynamodbTableImportTableS3BucketSourceOutputReference(this, "s3_bucket_source");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._inputCompressionType !== undefined) {
hasAnyValues = true;
internalValueResult.inputCompressionType = this._inputCompressionType;
}
if (this._inputFormat !== undefined) {
hasAnyValues = true;
internalValueResult.inputFormat = this._inputFormat;
}
if (this._inputFormatOptions?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.inputFormatOptions = this._inputFormatOptions?.internalValue;
}
if (this._s3BucketSource?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.s3BucketSource = this._s3BucketSource?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._inputCompressionType = undefined;
this._inputFormat = undefined;
this._inputFormatOptions.internalValue = undefined;
this._s3BucketSource.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._inputCompressionType = value.inputCompressionType;
this._inputFormat = value.inputFormat;
this._inputFormatOptions.internalValue = value.inputFormatOptions;
this._s3BucketSource.internalValue = value.s3BucketSource;
}
}
get inputCompressionType() {
return this.getStringAttribute('input_compression_type');
}
set inputCompressionType(value) {
this._inputCompressionType = value;
}
resetInputCompressionType() {
this._inputCompressionType = undefined;
}
// Temporarily expose input value. Use with caution.
get inputCompressionTypeInput() {
return this._inputCompressionType;
}
get inputFormat() {
return this.getStringAttribute('input_format');
}
set inputFormat(value) {
this._inputFormat = value;
}
// Temporarily expose input value. Use with caution.
get inputFormatInput() {
return this._inputFormat;
}
get inputFormatOptions() {
return this._inputFormatOptions;
}
putInputFormatOptions(value) {
this._inputFormatOptions.internalValue = value;
}
resetInputFormatOptions() {
this._inputFormatOptions.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get inputFormatOptionsInput() {
return this._inputFormatOptions.internalValue;
}
get s3BucketSource() {
return this._s3BucketSource;
}
putS3BucketSource(value) {
this._s3BucketSource.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get s3BucketSourceInput() {
return this._s3BucketSource.internalValue;
}
}
exports.DynamodbTableImportTableOutputReference = DynamodbTableImportTableOutputReference;
_j = JSII_RTTI_SYMBOL_1;
DynamodbTableImportTableOutputReference[_j] = { fqn: "@cdktf/provider-aws.dynamodbTable.DynamodbTableImportTableOutputReference", version: "19.50.0" };
function dynamodbTableLocalSecondaryIndexToTerraform(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 {
name: cdktf.stringToTerraform(struct.name),
non_key_attributes: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.nonKeyAttributes),
projection_type: cdktf.stringToTerraform(struct.projectionType),
range_key: cdktf.stringToTerraform(struct.rangeKey),
};
}
exports.dynamodbTableLocalSecondaryIndexToTerraform = dynamodbTableLocalSecondaryIndexToTerraform;
function dynamodbTableLocalSecondaryIndexToHclTerraform(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 = {
name: {
value: cdktf.stringToHclTerraform(struct.name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
non_key_attributes: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.nonKeyAttributes),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
projection_type: {
value: cdktf.stringToHclTerraform(struct.projectionType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
range_key: {
value: cdktf.stringToHclTerraform(struct.rangeKey),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dynamodbTableLocalSecondaryIndexToHclTerraform = dynamodbTableLocalSecondaryIndexToHclTerraform;
class DynamodbTableLocalSecondaryIndexOutputReference 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._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
if (this._nonKeyAttributes !== undefined) {
hasAnyValues = true;
internalValueResult.nonKeyAttributes = this._nonKeyAttributes;
}
if (this._projectionType !== undefined) {
hasAnyValues = true;
internalValueResult.projectionType = this._projectionType;
}
if (this._rangeKey !== undefined) {
hasAnyValues = true;
internalValueResult.rangeKey = this._rangeKey;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._name = undefined;
this._nonKeyAttributes = undefined;
this._projectionType = undefined;
this._rangeKey = 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._name = value.name;
this._nonKeyAttributes = value.nonKeyAttributes;
this._projectionType = value.projectionType;
this._rangeKey = value.rangeKey;
}
}
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 nonKeyAttributes() {
return this.getListAttribute('non_key_attributes');
}
set nonKeyAttributes(value) {
this._nonKeyAttributes = value;
}
resetNonKeyAttributes() {
this._nonKeyAttributes = undefined;
}
// Temporarily expose input value. Use with caution.
get nonKeyAttributesInput() {
return this._nonKeyAttributes;
}
get projectionType() {
return this.getStringAttribute('projection_type');
}
set projectionType(value) {
this._projectionType = value;
}
// Temporarily expose input value. Use with caution.
get projectionTypeInput() {
return this._projectionType;
}
get rangeKey() {
return this.getStringAttribute('range_key');
}
set rangeKey(value) {
this._rangeKey = value;
}
// Temporarily expose input value. Use with caution.
get rangeKeyInput() {
return this._rangeKey;
}
}
exports.DynamodbTableLocalSecondaryIndexOutputReference = DynamodbTableLocalSecondaryIndexOutputReference;
_k = JSII_RTTI_SYMBOL_1;
DynamodbTableLocalSecondaryIndexOutputReference[_k] = { fqn: "@cdktf/provider-aws.dynamodbTable.DynamodbTableLocalSecondaryIndexOutputReference", version: "19.50.0" };
class DynamodbTableLocalSecondaryIndexList 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 DynamodbTableLocalSecondaryIndexOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.DynamodbTableLocalSecondaryIndexList = DynamodbTableLocalSecondaryIndexList;
_l = JSII_RTTI_SYMBOL_1;
DynamodbTableLocalSecondaryIndexList[_l] = { fqn: "@cdktf/provider-aws.dynamodbTable.DynamodbTableLocalSecondaryIndexList", version: "19.50.0" };
function dynamodbTableOnDemandThroughputToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {