@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,145 lines • 179 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FsxFileCache = exports.FsxFileCacheTimeoutsOutputReference = exports.fsxFileCacheTimeoutsToHclTerraform = exports.fsxFileCacheTimeoutsToTerraform = exports.FsxFileCacheLustreConfigurationList = exports.FsxFileCacheLustreConfigurationOutputReference = exports.fsxFileCacheLustreConfigurationToHclTerraform = exports.fsxFileCacheLustreConfigurationToTerraform = exports.FsxFileCacheLustreConfigurationMetadataConfigurationList = exports.FsxFileCacheLustreConfigurationMetadataConfigurationOutputReference = exports.fsxFileCacheLustreConfigurationMetadataConfigurationToHclTerraform = exports.fsxFileCacheLustreConfigurationMetadataConfigurationToTerraform = exports.FsxFileCacheLustreConfigurationLogConfigurationList = exports.FsxFileCacheLustreConfigurationLogConfigurationOutputReference = exports.fsxFileCacheLustreConfigurationLogConfigurationToHclTerraform = exports.fsxFileCacheLustreConfigurationLogConfigurationToTerraform = exports.FsxFileCacheDataRepositoryAssociationList = exports.FsxFileCacheDataRepositoryAssociationOutputReference = exports.fsxFileCacheDataRepositoryAssociationToHclTerraform = exports.fsxFileCacheDataRepositoryAssociationToTerraform = exports.FsxFileCacheDataRepositoryAssociationNfsList = exports.FsxFileCacheDataRepositoryAssociationNfsOutputReference = exports.fsxFileCacheDataRepositoryAssociationNfsToHclTerraform = exports.fsxFileCacheDataRepositoryAssociationNfsToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function fsxFileCacheDataRepositoryAssociationNfsToTerraform(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 {
dns_ips: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.dnsIps),
version: cdktf.stringToTerraform(struct.version),
};
}
exports.fsxFileCacheDataRepositoryAssociationNfsToTerraform = fsxFileCacheDataRepositoryAssociationNfsToTerraform;
function fsxFileCacheDataRepositoryAssociationNfsToHclTerraform(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 = {
dns_ips: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.dnsIps),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
version: {
value: cdktf.stringToHclTerraform(struct.version),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.fsxFileCacheDataRepositoryAssociationNfsToHclTerraform = fsxFileCacheDataRepositoryAssociationNfsToHclTerraform;
class FsxFileCacheDataRepositoryAssociationNfsOutputReference 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._dnsIps !== undefined) {
hasAnyValues = true;
internalValueResult.dnsIps = this._dnsIps;
}
if (this._version !== undefined) {
hasAnyValues = true;
internalValueResult.version = this._version;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._dnsIps = undefined;
this._version = 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._dnsIps = value.dnsIps;
this._version = value.version;
}
}
get dnsIps() {
return cdktf.Fn.tolist(this.getListAttribute('dns_ips'));
}
set dnsIps(value) {
this._dnsIps = value;
}
resetDnsIps() {
this._dnsIps = undefined;
}
// Temporarily expose input value. Use with caution.
get dnsIpsInput() {
return this._dnsIps;
}
get version() {
return this.getStringAttribute('version');
}
set version(value) {
this._version = value;
}
// Temporarily expose input value. Use with caution.
get versionInput() {
return this._version;
}
}
exports.FsxFileCacheDataRepositoryAssociationNfsOutputReference = FsxFileCacheDataRepositoryAssociationNfsOutputReference;
_a = JSII_RTTI_SYMBOL_1;
FsxFileCacheDataRepositoryAssociationNfsOutputReference[_a] = { fqn: "@cdktf/provider-aws.fsxFileCache.FsxFileCacheDataRepositoryAssociationNfsOutputReference", version: "19.50.0" };
class FsxFileCacheDataRepositoryAssociationNfsList 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 FsxFileCacheDataRepositoryAssociationNfsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.FsxFileCacheDataRepositoryAssociationNfsList = FsxFileCacheDataRepositoryAssociationNfsList;
_b = JSII_RTTI_SYMBOL_1;
FsxFileCacheDataRepositoryAssociationNfsList[_b] = { fqn: "@cdktf/provider-aws.fsxFileCache.FsxFileCacheDataRepositoryAssociationNfsList", version: "19.50.0" };
function fsxFileCacheDataRepositoryAssociationToTerraform(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_repository_path: cdktf.stringToTerraform(struct.dataRepositoryPath),
data_repository_subdirectories: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.dataRepositorySubdirectories),
file_cache_path: cdktf.stringToTerraform(struct.fileCachePath),
tags: cdktf.hashMapper(cdktf.stringToTerraform)(struct.tags),
nfs: cdktf.listMapper(fsxFileCacheDataRepositoryAssociationNfsToTerraform, true)(struct.nfs),
};
}
exports.fsxFileCacheDataRepositoryAssociationToTerraform = fsxFileCacheDataRepositoryAssociationToTerraform;
function fsxFileCacheDataRepositoryAssociationToHclTerraform(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_repository_path: {
value: cdktf.stringToHclTerraform(struct.dataRepositoryPath),
isBlock: false,
type: "simple",
storageClassType: "string",
},
data_repository_subdirectories: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.dataRepositorySubdirectories),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
file_cache_path: {
value: cdktf.stringToHclTerraform(struct.fileCachePath),
isBlock: false,
type: "simple",
storageClassType: "string",
},
tags: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.tags),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
nfs: {
value: cdktf.listMapperHcl(fsxFileCacheDataRepositoryAssociationNfsToHclTerraform, true)(struct.nfs),
isBlock: true,
type: "set",
storageClassType: "FsxFileCacheDataRepositoryAssociationNfsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.fsxFileCacheDataRepositoryAssociationToHclTerraform = fsxFileCacheDataRepositoryAssociationToHclTerraform;
class FsxFileCacheDataRepositoryAssociationOutputReference 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;
// nfs - computed: false, optional: true, required: false
this._nfs = new FsxFileCacheDataRepositoryAssociationNfsList(this, "nfs", true);
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._dataRepositoryPath !== undefined) {
hasAnyValues = true;
internalValueResult.dataRepositoryPath = this._dataRepositoryPath;
}
if (this._dataRepositorySubdirectories !== undefined) {
hasAnyValues = true;
internalValueResult.dataRepositorySubdirectories = this._dataRepositorySubdirectories;
}
if (this._fileCachePath !== undefined) {
hasAnyValues = true;
internalValueResult.fileCachePath = this._fileCachePath;
}
if (this._tags !== undefined) {
hasAnyValues = true;
internalValueResult.tags = this._tags;
}
if (this._nfs?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.nfs = this._nfs?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._dataRepositoryPath = undefined;
this._dataRepositorySubdirectories = undefined;
this._fileCachePath = undefined;
this._tags = undefined;
this._nfs.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._dataRepositoryPath = value.dataRepositoryPath;
this._dataRepositorySubdirectories = value.dataRepositorySubdirectories;
this._fileCachePath = value.fileCachePath;
this._tags = value.tags;
this._nfs.internalValue = value.nfs;
}
}
// association_id - computed: true, optional: false, required: false
get associationId() {
return this.getStringAttribute('association_id');
}
get dataRepositoryPath() {
return this.getStringAttribute('data_repository_path');
}
set dataRepositoryPath(value) {
this._dataRepositoryPath = value;
}
// Temporarily expose input value. Use with caution.
get dataRepositoryPathInput() {
return this._dataRepositoryPath;
}
get dataRepositorySubdirectories() {
return cdktf.Fn.tolist(this.getListAttribute('data_repository_subdirectories'));
}
set dataRepositorySubdirectories(value) {
this._dataRepositorySubdirectories = value;
}
resetDataRepositorySubdirectories() {
this._dataRepositorySubdirectories = undefined;
}
// Temporarily expose input value. Use with caution.
get dataRepositorySubdirectoriesInput() {
return this._dataRepositorySubdirectories;
}
// file_cache_id - computed: true, optional: false, required: false
get fileCacheId() {
return this.getStringAttribute('file_cache_id');
}
get fileCachePath() {
return this.getStringAttribute('file_cache_path');
}
set fileCachePath(value) {
this._fileCachePath = value;
}
// Temporarily expose input value. Use with caution.
get fileCachePathInput() {
return this._fileCachePath;
}
// file_system_id - computed: true, optional: false, required: false
get fileSystemId() {
return this.getStringAttribute('file_system_id');
}
// file_system_path - computed: true, optional: false, required: false
get fileSystemPath() {
return this.getStringAttribute('file_system_path');
}
// imported_file_chunk_size - computed: true, optional: false, required: false
get importedFileChunkSize() {
return this.getNumberAttribute('imported_file_chunk_size');
}
// resource_arn - computed: true, optional: false, required: false
get resourceArn() {
return this.getStringAttribute('resource_arn');
}
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 nfs() {
return this._nfs;
}
putNfs(value) {
this._nfs.internalValue = value;
}
resetNfs() {
this._nfs.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get nfsInput() {
return this._nfs.internalValue;
}
}
exports.FsxFileCacheDataRepositoryAssociationOutputReference = FsxFileCacheDataRepositoryAssociationOutputReference;
_c = JSII_RTTI_SYMBOL_1;
FsxFileCacheDataRepositoryAssociationOutputReference[_c] = { fqn: "@cdktf/provider-aws.fsxFileCache.FsxFileCacheDataRepositoryAssociationOutputReference", version: "19.50.0" };
class FsxFileCacheDataRepositoryAssociationList 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 FsxFileCacheDataRepositoryAssociationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.FsxFileCacheDataRepositoryAssociationList = FsxFileCacheDataRepositoryAssociationList;
_d = JSII_RTTI_SYMBOL_1;
FsxFileCacheDataRepositoryAssociationList[_d] = { fqn: "@cdktf/provider-aws.fsxFileCache.FsxFileCacheDataRepositoryAssociationList", version: "19.50.0" };
function fsxFileCacheLustreConfigurationLogConfigurationToTerraform(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 {};
}
exports.fsxFileCacheLustreConfigurationLogConfigurationToTerraform = fsxFileCacheLustreConfigurationLogConfigurationToTerraform;
function fsxFileCacheLustreConfigurationLogConfigurationToHclTerraform(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;
}
exports.fsxFileCacheLustreConfigurationLogConfigurationToHclTerraform = fsxFileCacheLustreConfigurationLogConfigurationToHclTerraform;
class FsxFileCacheLustreConfigurationLogConfigurationOutputReference 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;
}
}
// destination - computed: true, optional: false, required: false
get destination() {
return this.getStringAttribute('destination');
}
// level - computed: true, optional: false, required: false
get level() {
return this.getStringAttribute('level');
}
}
exports.FsxFileCacheLustreConfigurationLogConfigurationOutputReference = FsxFileCacheLustreConfigurationLogConfigurationOutputReference;
_e = JSII_RTTI_SYMBOL_1;
FsxFileCacheLustreConfigurationLogConfigurationOutputReference[_e] = { fqn: "@cdktf/provider-aws.fsxFileCache.FsxFileCacheLustreConfigurationLogConfigurationOutputReference", version: "19.50.0" };
class FsxFileCacheLustreConfigurationLogConfigurationList 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 FsxFileCacheLustreConfigurationLogConfigurationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.FsxFileCacheLustreConfigurationLogConfigurationList = FsxFileCacheLustreConfigurationLogConfigurationList;
_f = JSII_RTTI_SYMBOL_1;
FsxFileCacheLustreConfigurationLogConfigurationList[_f] = { fqn: "@cdktf/provider-aws.fsxFileCache.FsxFileCacheLustreConfigurationLogConfigurationList", version: "19.50.0" };
function fsxFileCacheLustreConfigurationMetadataConfigurationToTerraform(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 {
storage_capacity: cdktf.numberToTerraform(struct.storageCapacity),
};
}
exports.fsxFileCacheLustreConfigurationMetadataConfigurationToTerraform = fsxFileCacheLustreConfigurationMetadataConfigurationToTerraform;
function fsxFileCacheLustreConfigurationMetadataConfigurationToHclTerraform(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 = {
storage_capacity: {
value: cdktf.numberToHclTerraform(struct.storageCapacity),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.fsxFileCacheLustreConfigurationMetadataConfigurationToHclTerraform = fsxFileCacheLustreConfigurationMetadataConfigurationToHclTerraform;
class FsxFileCacheLustreConfigurationMetadataConfigurationOutputReference 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._storageCapacity !== undefined) {
hasAnyValues = true;
internalValueResult.storageCapacity = this._storageCapacity;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._storageCapacity = 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._storageCapacity = value.storageCapacity;
}
}
get storageCapacity() {
return this.getNumberAttribute('storage_capacity');
}
set storageCapacity(value) {
this._storageCapacity = value;
}
// Temporarily expose input value. Use with caution.
get storageCapacityInput() {
return this._storageCapacity;
}
}
exports.FsxFileCacheLustreConfigurationMetadataConfigurationOutputReference = FsxFileCacheLustreConfigurationMetadataConfigurationOutputReference;
_g = JSII_RTTI_SYMBOL_1;
FsxFileCacheLustreConfigurationMetadataConfigurationOutputReference[_g] = { fqn: "@cdktf/provider-aws.fsxFileCache.FsxFileCacheLustreConfigurationMetadataConfigurationOutputReference", version: "19.50.0" };
class FsxFileCacheLustreConfigurationMetadataConfigurationList 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 FsxFileCacheLustreConfigurationMetadataConfigurationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.FsxFileCacheLustreConfigurationMetadataConfigurationList = FsxFileCacheLustreConfigurationMetadataConfigurationList;
_h = JSII_RTTI_SYMBOL_1;
FsxFileCacheLustreConfigurationMetadataConfigurationList[_h] = { fqn: "@cdktf/provider-aws.fsxFileCache.FsxFileCacheLustreConfigurationMetadataConfigurationList", version: "19.50.0" };
function fsxFileCacheLustreConfigurationToTerraform(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 {
deployment_type: cdktf.stringToTerraform(struct.deploymentType),
per_unit_storage_throughput: cdktf.numberToTerraform(struct.perUnitStorageThroughput),
weekly_maintenance_start_time: cdktf.stringToTerraform(struct.weeklyMaintenanceStartTime),
metadata_configuration: cdktf.listMapper(fsxFileCacheLustreConfigurationMetadataConfigurationToTerraform, true)(struct.metadataConfiguration),
};
}
exports.fsxFileCacheLustreConfigurationToTerraform = fsxFileCacheLustreConfigurationToTerraform;
function fsxFileCacheLustreConfigurationToHclTerraform(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 = {
deployment_type: {
value: cdktf.stringToHclTerraform(struct.deploymentType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
per_unit_storage_throughput: {
value: cdktf.numberToHclTerraform(struct.perUnitStorageThroughput),
isBlock: false,
type: "simple",
storageClassType: "number",
},
weekly_maintenance_start_time: {
value: cdktf.stringToHclTerraform(struct.weeklyMaintenanceStartTime),
isBlock: false,
type: "simple",
storageClassType: "string",
},
metadata_configuration: {
value: cdktf.listMapperHcl(fsxFileCacheLustreConfigurationMetadataConfigurationToHclTerraform, true)(struct.metadataConfiguration),
isBlock: true,
type: "set",
storageClassType: "FsxFileCacheLustreConfigurationMetadataConfigurationList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.fsxFileCacheLustreConfigurationToHclTerraform = fsxFileCacheLustreConfigurationToHclTerraform;
class FsxFileCacheLustreConfigurationOutputReference 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;
// log_configuration - computed: true, optional: false, required: false
this._logConfiguration = new FsxFileCacheLustreConfigurationLogConfigurationList(this, "log_configuration", true);
// metadata_configuration - computed: false, optional: false, required: true
this._metadataConfiguration = new FsxFileCacheLustreConfigurationMetadataConfigurationList(this, "metadata_configuration", true);
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._deploymentType !== undefined) {
hasAnyValues = true;
internalValueResult.deploymentType = this._deploymentType;
}
if (this._perUnitStorageThroughput !== undefined) {
hasAnyValues = true;
internalValueResult.perUnitStorageThroughput = this._perUnitStorageThroughput;
}
if (this._weeklyMaintenanceStartTime !== undefined) {
hasAnyValues = true;
internalValueResult.weeklyMaintenanceStartTime = this._weeklyMaintenanceStartTime;
}
if (this._metadataConfiguration?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.metadataConfiguration = this._metadataConfiguration?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._deploymentType = undefined;
this._perUnitStorageThroughput = undefined;
this._weeklyMaintenanceStartTime = undefined;
this._metadataConfiguration.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._deploymentType = value.deploymentType;
this._perUnitStorageThroughput = value.perUnitStorageThroughput;
this._weeklyMaintenanceStartTime = value.weeklyMaintenanceStartTime;
this._metadataConfiguration.internalValue = value.metadataConfiguration;
}
}
get deploymentType() {
return this.getStringAttribute('deployment_type');
}
set deploymentType(value) {
this._deploymentType = value;
}
// Temporarily expose input value. Use with caution.
get deploymentTypeInput() {
return this._deploymentType;
}
get logConfiguration() {
return this._logConfiguration;
}
// mount_name - computed: true, optional: false, required: false
get mountName() {
return this.getStringAttribute('mount_name');
}
get perUnitStorageThroughput() {
return this.getNumberAttribute('per_unit_storage_throughput');
}
set perUnitStorageThroughput(value) {
this._perUnitStorageThroughput = value;
}
// Temporarily expose input value. Use with caution.
get perUnitStorageThroughputInput() {
return this._perUnitStorageThroughput;
}
get weeklyMaintenanceStartTime() {
return this.getStringAttribute('weekly_maintenance_start_time');
}
set weeklyMaintenanceStartTime(value) {
this._weeklyMaintenanceStartTime = value;
}
resetWeeklyMaintenanceStartTime() {
this._weeklyMaintenanceStartTime = undefined;
}
// Temporarily expose input value. Use with caution.
get weeklyMaintenanceStartTimeInput() {
return this._weeklyMaintenanceStartTime;
}
get metadataConfiguration() {
return this._metadataConfiguration;
}
putMetadataConfiguration(value) {
this._metadataConfiguration.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get metadataConfigurationInput() {
return this._metadataConfiguration.internalValue;
}
}
exports.FsxFileCacheLustreConfigurationOutputReference = FsxFileCacheLustreConfigurationOutputReference;
_j = JSII_RTTI_SYMBOL_1;
FsxFileCacheLustreConfigurationOutputReference[_j] = { fqn: "@cdktf/provider-aws.fsxFileCache.FsxFileCacheLustreConfigurationOutputReference", version: "19.50.0" };
class FsxFileCacheLustreConfigurationList 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 FsxFileCacheLustreConfigurationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.FsxFileCacheLustreConfigurationList = FsxFileCacheLustreConfigurationList;
_k = JSII_RTTI_SYMBOL_1;
FsxFileCacheLustreConfigurationList[_k] = { fqn: "@cdktf/provider-aws.fsxFileCache.FsxFileCacheLustreConfigurationList", version: "19.50.0" };
function fsxFileCacheTimeoutsToTerraform(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),
};
}
exports.fsxFileCacheTimeoutsToTerraform = fsxFileCacheTimeoutsToTerraform;
function fsxFileCacheTimeoutsToHclTerraform(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));
}
exports.fsxFileCacheTimeoutsToHclTerraform = fsxFileCacheTimeoutsToHclTerraform;
class FsxFileCacheTimeoutsOutputReference 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.FsxFileCacheTimeoutsOutputReference = FsxFileCacheTimeoutsOutputReference;
_l = JSII_RTTI_SYMBOL_1;
FsxFileCacheTimeoutsOutputReference[_l] = { fqn: "@cdktf/provider-aws.fsxFileCache.FsxFileCacheTimeoutsOutputReference", version: "19.50.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/fsx_file_cache aws_fsx_file_cache}
*/
class FsxFileCache extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a FsxFileCache 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 FsxFileCache to import
* @param importFromId The id of the existing FsxFileCache that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/fsx_file_cache#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the FsxFileCache to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_fsx_file_cache", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/fsx_file_cache aws_fsx_file_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 FsxFileCacheConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'aws_fsx_file_cache',
terraformGeneratorMetadata: {
providerName: 'aws',
providerVersion: '5.84.0',
providerVersionConstraint: '~> 5.0'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// data_repository_association - computed: false, optional: true, required: false
this._dataRepositoryAssociation = new FsxFileCacheDataRepositoryAssociationList(this, "data_repository_association", true);
// lustre_configuration - computed: false, optional: true, required: false
this._lustreConfiguration = new FsxFileCacheLustreConfigurationList(this, "lustre_configuration", true);
// timeouts - computed: false, optional: true, required: false
this._timeouts = new FsxFileCacheTimeoutsOutputReference(this, "timeouts");
this._copyTagsToDataRepositoryAssociations = config.copyTagsToDataRepositoryAssociations;
this._fileCacheType = config.fileCacheType;
this._fileCacheTypeVersion = config.fileCacheTypeVersion;
this._id = config.id;
this._kmsKeyId = config.kmsKeyId;
this._securityGroupIds = config.securityGroupIds;
this._storageCapacity = config.storageCapacity;
this._subnetIds = config.subnetIds;
this._tags = config.tags;
this._tagsAll = config.tagsAll;
this._dataRepositoryAssociation.internalValue = config.dataRepositoryAssociation;
this._lustreConfiguration.internalValue = config.lustreConfiguration;
this._timeouts.internalValue = config.timeouts;
}
// ==========
// ATTRIBUTES
// ==========
// arn - computed: true, optional: false, required: false
get arn() {
return this.getStringAttribute('arn');
}
get copyTagsToDataRepositoryAssociations() {
return this.getBooleanAttribute('copy_tags_to_data_repository_associations');
}
set copyTagsToDataRepositoryAssociations(value) {
this._copyTagsToDataRepositoryAssociations = value;
}
resetCopyTagsToDataRepositoryAssociations() {
this._copyTagsToDataRepositoryAssociations = undefined;
}
// Temporarily expose input value. Use with caution.
get copyTagsToDataRepositoryAssociationsInput() {
return this._copyTagsToDataRepositoryAssociations;
}
// data_repository_association_ids - computed: true, optional: false, required: false
get dataRepositoryAssociationIds() {
return cdktf.Fn.tolist(this.getListAttribute('data_repository_association_ids'));
}
// dns_name - computed: true, optional: false, required: false
get dnsName() {
return this.getStringAttribute('dns_name');
}
// file_cache_id - computed: true, optional: false, required: false
get fileCacheId() {
return this.getStringAttribute('file_cache_id');
}
get fileCacheType() {
return this.getStringAttribute('file_cache_type');
}
set fileCacheType(value) {
this._fileCacheType = value;
}
// Temporarily expose input value. Use with caution.
get fileCacheTypeInput() {
return this._fileCacheType;
}
get fileCacheTypeVersion() {
return this.getStringAttribute('file_cache_type_version');
}
set fileCacheTypeVersion(value) {
this._fileCacheTypeVersion = value;
}
// Temporarily expose input value. Use with caution.
get fileCacheTypeVersionInput() {
return this._fileCacheTypeVersion;
}
get id() {
return this.getStringAttribute('id');
}
set id(value) {
this._id = value;
}
resetId() {
this._id = undefined;
}
// Temporarily expose input value. Use with caution.
get idInput() {
return this._id;
}
get kmsKeyId() {
return this.getStringAttribute('kms_key_id');
}
set kmsKeyId(value) {
this._kmsKeyId = value;
}
resetKmsKeyId() {
this._kmsKeyId = undefined;
}
// Temporarily expose input value. Use with caution.
get kmsKeyIdInput() {
return this._kmsKeyId;
}
// network_interface_ids - computed: true, optional: false, required: false
get networkInterfaceIds() {
return cdktf.Fn.tolist(this.getListAttribute('network_interface_ids'));
}
// owner_id - computed: true, optional: false, required: false
get ownerId() {
return this.getStringAttribute('owner_id');
}
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 storageCapacity() {
return this.getNumberAttribute('storage_capacity');
}
set storageCapacity(value) {
this._storageCapacity = value;
}
// Temporarily expose input value. Use with caution.
get storageCapacityInput() {
return this._storageCapacity;
}
get subnetIds() {
return this.getListAttribute('subnet_ids');
}
set subnetIds(value) {
this._subnetIds = value;
}
// 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.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;
}
// vpc_id - computed: true, optional: false, required: false
get vpcId() {
return this.getStringAttribute('vpc_id');
}
get dataRepositoryAssociation() {
return this._dataRepositoryAssociation;
}
putDataRepositoryAssociation(value) {
this._dataRepositoryAssociation.internalValue = value;
}
resetDataRepositoryAssociation() {
this._dataRepositoryAssociation.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get dataRepositoryAssociationInput() {
return this._dataRepositoryAssociation.internalValue;
}
get lustreConfiguration() {
return this._lustreConfiguration;
}
putLustreConfiguration(value) {
this._lustreConfiguration.internalValue = value;
}
resetLustreConfiguration() {
this._lustreConfiguration.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get lustreConfigurationInput() {
return this._lustreConfiguration.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 {
copy_tags_to_data_repository_associations: cdktf.booleanToTerraform(this._copyTagsToDataRepositoryAssociations),
file_cache_type: cdktf.stringToTerraform(this._fileCacheType),
file_cache_type_version: cdktf.stringToTerraform(this._fileCacheTypeVersion),
id: cdktf.stringToTerraform(this._id),
kms_key_id: cdktf.stringToTerraform(this._kmsKeyId),
security_group_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(this._securityGroupIds),
storage_capacit