@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,082 lines • 640 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
Object.defineProperty(exports, "__esModule", { value: true });
exports.spotFleetRequestLaunchTemplateConfigOverridesToTerraform = exports.SpotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsOutputReference = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsToHclTerraform = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsToTerraform = exports.SpotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsVcpuCountOutputReference = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsVcpuCountToHclTerraform = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsVcpuCountToTerraform = exports.SpotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsTotalLocalStorageGbOutputReference = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsTotalLocalStorageGbToHclTerraform = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsTotalLocalStorageGbToTerraform = exports.SpotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsNetworkInterfaceCountOutputReference = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsNetworkInterfaceCountToHclTerraform = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsNetworkInterfaceCountToTerraform = exports.SpotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsNetworkBandwidthGbpsOutputReference = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsNetworkBandwidthGbpsToHclTerraform = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsNetworkBandwidthGbpsToTerraform = exports.SpotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsMemoryMibOutputReference = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsMemoryMibToHclTerraform = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsMemoryMibToTerraform = exports.SpotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsMemoryGibPerVcpuOutputReference = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsMemoryGibPerVcpuToHclTerraform = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsMemoryGibPerVcpuToTerraform = exports.SpotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsBaselineEbsBandwidthMbpsOutputReference = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsBaselineEbsBandwidthMbpsToHclTerraform = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsBaselineEbsBandwidthMbpsToTerraform = exports.SpotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsAcceleratorTotalMemoryMibOutputReference = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsAcceleratorTotalMemoryMibToHclTerraform = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsAcceleratorTotalMemoryMibToTerraform = exports.SpotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsAcceleratorCountOutputReference = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsAcceleratorCountToHclTerraform = exports.spotFleetRequestLaunchTemplateConfigOverridesInstanceRequirementsAcceleratorCountToTerraform = exports.SpotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationOutputReference = exports.spotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationToHclTerraform = exports.spotFleetRequestLaunchTemplateConfigLaunchTemplateSpecificationToTerraform = exports.SpotFleetRequestLaunchSpecificationList = exports.SpotFleetRequestLaunchSpecificationOutputReference = exports.spotFleetRequestLaunchSpecificationToHclTerraform = exports.spotFleetRequestLaunchSpecificationToTerraform = exports.SpotFleetRequestLaunchSpecificationRootBlockDeviceList = exports.SpotFleetRequestLaunchSpecificationRootBlockDeviceOutputReference = exports.spotFleetRequestLaunchSpecificationRootBlockDeviceToHclTerraform = exports.spotFleetRequestLaunchSpecificationRootBlockDeviceToTerraform = exports.SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceList = exports.SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceOutputReference = exports.spotFleetRequestLaunchSpecificationEphemeralBlockDeviceToHclTerraform = exports.spotFleetRequestLaunchSpecificationEphemeralBlockDeviceToTerraform = exports.SpotFleetRequestLaunchSpecificationEbsBlockDeviceList = exports.SpotFleetRequestLaunchSpecificationEbsBlockDeviceOutputReference = exports.spotFleetRequestLaunchSpecificationEbsBlockDeviceToHclTerraform = exports.spotFleetRequestLaunchSpecificationEbsBlockDeviceToTerraform = void 0;
exports.SpotFleetRequest = exports.SpotFleetRequestTimeoutsOutputReference = exports.spotFleetRequestTimeoutsToHclTerraform = exports.spotFleetRequestTimeoutsToTerraform = exports.SpotFleetRequestSpotMaintenanceStrategiesOutputReference = exports.spotFleetRequestSpotMaintenanceStrategiesToHclTerraform = exports.spotFleetRequestSpotMaintenanceStrategiesToTerraform = exports.SpotFleetRequestSpotMaintenanceStrategiesCapacityRebalanceOutputReference = exports.spotFleetRequestSpotMaintenanceStrategiesCapacityRebalanceToHclTerraform = exports.spotFleetRequestSpotMaintenanceStrategiesCapacityRebalanceToTerraform = exports.SpotFleetRequestLaunchTemplateConfigList = exports.SpotFleetRequestLaunchTemplateConfigOutputReference = exports.spotFleetRequestLaunchTemplateConfigToHclTerraform = exports.spotFleetRequestLaunchTemplateConfigToTerraform = exports.SpotFleetRequestLaunchTemplateConfigOverridesList = exports.SpotFleetRequestLaunchTemplateConfigOverridesOutputReference = exports.spotFleetRequestLaunchTemplateConfigOverridesToHclTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function spotFleetRequestLaunchSpecificationEbsBlockDeviceToTerraform(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 {
delete_on_termination: cdktf.booleanToTerraform(struct.deleteOnTermination),
device_name: cdktf.stringToTerraform(struct.deviceName),
encrypted: cdktf.booleanToTerraform(struct.encrypted),
iops: cdktf.numberToTerraform(struct.iops),
kms_key_id: cdktf.stringToTerraform(struct.kmsKeyId),
snapshot_id: cdktf.stringToTerraform(struct.snapshotId),
throughput: cdktf.numberToTerraform(struct.throughput),
volume_size: cdktf.numberToTerraform(struct.volumeSize),
volume_type: cdktf.stringToTerraform(struct.volumeType),
};
}
exports.spotFleetRequestLaunchSpecificationEbsBlockDeviceToTerraform = spotFleetRequestLaunchSpecificationEbsBlockDeviceToTerraform;
function spotFleetRequestLaunchSpecificationEbsBlockDeviceToHclTerraform(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 = {
delete_on_termination: {
value: cdktf.booleanToHclTerraform(struct.deleteOnTermination),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
device_name: {
value: cdktf.stringToHclTerraform(struct.deviceName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
encrypted: {
value: cdktf.booleanToHclTerraform(struct.encrypted),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
iops: {
value: cdktf.numberToHclTerraform(struct.iops),
isBlock: false,
type: "simple",
storageClassType: "number",
},
kms_key_id: {
value: cdktf.stringToHclTerraform(struct.kmsKeyId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
snapshot_id: {
value: cdktf.stringToHclTerraform(struct.snapshotId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
throughput: {
value: cdktf.numberToHclTerraform(struct.throughput),
isBlock: false,
type: "simple",
storageClassType: "number",
},
volume_size: {
value: cdktf.numberToHclTerraform(struct.volumeSize),
isBlock: false,
type: "simple",
storageClassType: "number",
},
volume_type: {
value: cdktf.stringToHclTerraform(struct.volumeType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.spotFleetRequestLaunchSpecificationEbsBlockDeviceToHclTerraform = spotFleetRequestLaunchSpecificationEbsBlockDeviceToHclTerraform;
class SpotFleetRequestLaunchSpecificationEbsBlockDeviceOutputReference 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._deleteOnTermination !== undefined) {
hasAnyValues = true;
internalValueResult.deleteOnTermination = this._deleteOnTermination;
}
if (this._deviceName !== undefined) {
hasAnyValues = true;
internalValueResult.deviceName = this._deviceName;
}
if (this._encrypted !== undefined) {
hasAnyValues = true;
internalValueResult.encrypted = this._encrypted;
}
if (this._iops !== undefined) {
hasAnyValues = true;
internalValueResult.iops = this._iops;
}
if (this._kmsKeyId !== undefined) {
hasAnyValues = true;
internalValueResult.kmsKeyId = this._kmsKeyId;
}
if (this._snapshotId !== undefined) {
hasAnyValues = true;
internalValueResult.snapshotId = this._snapshotId;
}
if (this._throughput !== undefined) {
hasAnyValues = true;
internalValueResult.throughput = this._throughput;
}
if (this._volumeSize !== undefined) {
hasAnyValues = true;
internalValueResult.volumeSize = this._volumeSize;
}
if (this._volumeType !== undefined) {
hasAnyValues = true;
internalValueResult.volumeType = this._volumeType;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._deleteOnTermination = undefined;
this._deviceName = undefined;
this._encrypted = undefined;
this._iops = undefined;
this._kmsKeyId = undefined;
this._snapshotId = undefined;
this._throughput = undefined;
this._volumeSize = undefined;
this._volumeType = 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._deleteOnTermination = value.deleteOnTermination;
this._deviceName = value.deviceName;
this._encrypted = value.encrypted;
this._iops = value.iops;
this._kmsKeyId = value.kmsKeyId;
this._snapshotId = value.snapshotId;
this._throughput = value.throughput;
this._volumeSize = value.volumeSize;
this._volumeType = value.volumeType;
}
}
get deleteOnTermination() {
return this.getBooleanAttribute('delete_on_termination');
}
set deleteOnTermination(value) {
this._deleteOnTermination = value;
}
resetDeleteOnTermination() {
this._deleteOnTermination = undefined;
}
// Temporarily expose input value. Use with caution.
get deleteOnTerminationInput() {
return this._deleteOnTermination;
}
get deviceName() {
return this.getStringAttribute('device_name');
}
set deviceName(value) {
this._deviceName = value;
}
// Temporarily expose input value. Use with caution.
get deviceNameInput() {
return this._deviceName;
}
get encrypted() {
return this.getBooleanAttribute('encrypted');
}
set encrypted(value) {
this._encrypted = value;
}
resetEncrypted() {
this._encrypted = undefined;
}
// Temporarily expose input value. Use with caution.
get encryptedInput() {
return this._encrypted;
}
get iops() {
return this.getNumberAttribute('iops');
}
set iops(value) {
this._iops = value;
}
resetIops() {
this._iops = undefined;
}
// Temporarily expose input value. Use with caution.
get iopsInput() {
return this._iops;
}
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 snapshotId() {
return this.getStringAttribute('snapshot_id');
}
set snapshotId(value) {
this._snapshotId = value;
}
resetSnapshotId() {
this._snapshotId = undefined;
}
// Temporarily expose input value. Use with caution.
get snapshotIdInput() {
return this._snapshotId;
}
get throughput() {
return this.getNumberAttribute('throughput');
}
set throughput(value) {
this._throughput = value;
}
resetThroughput() {
this._throughput = undefined;
}
// Temporarily expose input value. Use with caution.
get throughputInput() {
return this._throughput;
}
get volumeSize() {
return this.getNumberAttribute('volume_size');
}
set volumeSize(value) {
this._volumeSize = value;
}
resetVolumeSize() {
this._volumeSize = undefined;
}
// Temporarily expose input value. Use with caution.
get volumeSizeInput() {
return this._volumeSize;
}
get volumeType() {
return this.getStringAttribute('volume_type');
}
set volumeType(value) {
this._volumeType = value;
}
resetVolumeType() {
this._volumeType = undefined;
}
// Temporarily expose input value. Use with caution.
get volumeTypeInput() {
return this._volumeType;
}
}
exports.SpotFleetRequestLaunchSpecificationEbsBlockDeviceOutputReference = SpotFleetRequestLaunchSpecificationEbsBlockDeviceOutputReference;
_a = JSII_RTTI_SYMBOL_1;
SpotFleetRequestLaunchSpecificationEbsBlockDeviceOutputReference[_a] = { fqn: "@cdktf/provider-aws.spotFleetRequest.SpotFleetRequestLaunchSpecificationEbsBlockDeviceOutputReference", version: "19.50.0" };
class SpotFleetRequestLaunchSpecificationEbsBlockDeviceList 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 SpotFleetRequestLaunchSpecificationEbsBlockDeviceOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.SpotFleetRequestLaunchSpecificationEbsBlockDeviceList = SpotFleetRequestLaunchSpecificationEbsBlockDeviceList;
_b = JSII_RTTI_SYMBOL_1;
SpotFleetRequestLaunchSpecificationEbsBlockDeviceList[_b] = { fqn: "@cdktf/provider-aws.spotFleetRequest.SpotFleetRequestLaunchSpecificationEbsBlockDeviceList", version: "19.50.0" };
function spotFleetRequestLaunchSpecificationEphemeralBlockDeviceToTerraform(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 {
device_name: cdktf.stringToTerraform(struct.deviceName),
virtual_name: cdktf.stringToTerraform(struct.virtualName),
};
}
exports.spotFleetRequestLaunchSpecificationEphemeralBlockDeviceToTerraform = spotFleetRequestLaunchSpecificationEphemeralBlockDeviceToTerraform;
function spotFleetRequestLaunchSpecificationEphemeralBlockDeviceToHclTerraform(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 = {
device_name: {
value: cdktf.stringToHclTerraform(struct.deviceName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
virtual_name: {
value: cdktf.stringToHclTerraform(struct.virtualName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.spotFleetRequestLaunchSpecificationEphemeralBlockDeviceToHclTerraform = spotFleetRequestLaunchSpecificationEphemeralBlockDeviceToHclTerraform;
class SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceOutputReference 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._deviceName !== undefined) {
hasAnyValues = true;
internalValueResult.deviceName = this._deviceName;
}
if (this._virtualName !== undefined) {
hasAnyValues = true;
internalValueResult.virtualName = this._virtualName;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._deviceName = undefined;
this._virtualName = 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._deviceName = value.deviceName;
this._virtualName = value.virtualName;
}
}
get deviceName() {
return this.getStringAttribute('device_name');
}
set deviceName(value) {
this._deviceName = value;
}
// Temporarily expose input value. Use with caution.
get deviceNameInput() {
return this._deviceName;
}
get virtualName() {
return this.getStringAttribute('virtual_name');
}
set virtualName(value) {
this._virtualName = value;
}
// Temporarily expose input value. Use with caution.
get virtualNameInput() {
return this._virtualName;
}
}
exports.SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceOutputReference = SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceOutputReference;
_c = JSII_RTTI_SYMBOL_1;
SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceOutputReference[_c] = { fqn: "@cdktf/provider-aws.spotFleetRequest.SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceOutputReference", version: "19.50.0" };
class SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceList 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 SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceList = SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceList;
_d = JSII_RTTI_SYMBOL_1;
SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceList[_d] = { fqn: "@cdktf/provider-aws.spotFleetRequest.SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceList", version: "19.50.0" };
function spotFleetRequestLaunchSpecificationRootBlockDeviceToTerraform(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 {
delete_on_termination: cdktf.booleanToTerraform(struct.deleteOnTermination),
encrypted: cdktf.booleanToTerraform(struct.encrypted),
iops: cdktf.numberToTerraform(struct.iops),
kms_key_id: cdktf.stringToTerraform(struct.kmsKeyId),
throughput: cdktf.numberToTerraform(struct.throughput),
volume_size: cdktf.numberToTerraform(struct.volumeSize),
volume_type: cdktf.stringToTerraform(struct.volumeType),
};
}
exports.spotFleetRequestLaunchSpecificationRootBlockDeviceToTerraform = spotFleetRequestLaunchSpecificationRootBlockDeviceToTerraform;
function spotFleetRequestLaunchSpecificationRootBlockDeviceToHclTerraform(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 = {
delete_on_termination: {
value: cdktf.booleanToHclTerraform(struct.deleteOnTermination),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
encrypted: {
value: cdktf.booleanToHclTerraform(struct.encrypted),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
iops: {
value: cdktf.numberToHclTerraform(struct.iops),
isBlock: false,
type: "simple",
storageClassType: "number",
},
kms_key_id: {
value: cdktf.stringToHclTerraform(struct.kmsKeyId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
throughput: {
value: cdktf.numberToHclTerraform(struct.throughput),
isBlock: false,
type: "simple",
storageClassType: "number",
},
volume_size: {
value: cdktf.numberToHclTerraform(struct.volumeSize),
isBlock: false,
type: "simple",
storageClassType: "number",
},
volume_type: {
value: cdktf.stringToHclTerraform(struct.volumeType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.spotFleetRequestLaunchSpecificationRootBlockDeviceToHclTerraform = spotFleetRequestLaunchSpecificationRootBlockDeviceToHclTerraform;
class SpotFleetRequestLaunchSpecificationRootBlockDeviceOutputReference 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._deleteOnTermination !== undefined) {
hasAnyValues = true;
internalValueResult.deleteOnTermination = this._deleteOnTermination;
}
if (this._encrypted !== undefined) {
hasAnyValues = true;
internalValueResult.encrypted = this._encrypted;
}
if (this._iops !== undefined) {
hasAnyValues = true;
internalValueResult.iops = this._iops;
}
if (this._kmsKeyId !== undefined) {
hasAnyValues = true;
internalValueResult.kmsKeyId = this._kmsKeyId;
}
if (this._throughput !== undefined) {
hasAnyValues = true;
internalValueResult.throughput = this._throughput;
}
if (this._volumeSize !== undefined) {
hasAnyValues = true;
internalValueResult.volumeSize = this._volumeSize;
}
if (this._volumeType !== undefined) {
hasAnyValues = true;
internalValueResult.volumeType = this._volumeType;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._deleteOnTermination = undefined;
this._encrypted = undefined;
this._iops = undefined;
this._kmsKeyId = undefined;
this._throughput = undefined;
this._volumeSize = undefined;
this._volumeType = 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._deleteOnTermination = value.deleteOnTermination;
this._encrypted = value.encrypted;
this._iops = value.iops;
this._kmsKeyId = value.kmsKeyId;
this._throughput = value.throughput;
this._volumeSize = value.volumeSize;
this._volumeType = value.volumeType;
}
}
get deleteOnTermination() {
return this.getBooleanAttribute('delete_on_termination');
}
set deleteOnTermination(value) {
this._deleteOnTermination = value;
}
resetDeleteOnTermination() {
this._deleteOnTermination = undefined;
}
// Temporarily expose input value. Use with caution.
get deleteOnTerminationInput() {
return this._deleteOnTermination;
}
get encrypted() {
return this.getBooleanAttribute('encrypted');
}
set encrypted(value) {
this._encrypted = value;
}
resetEncrypted() {
this._encrypted = undefined;
}
// Temporarily expose input value. Use with caution.
get encryptedInput() {
return this._encrypted;
}
get iops() {
return this.getNumberAttribute('iops');
}
set iops(value) {
this._iops = value;
}
resetIops() {
this._iops = undefined;
}
// Temporarily expose input value. Use with caution.
get iopsInput() {
return this._iops;
}
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 throughput() {
return this.getNumberAttribute('throughput');
}
set throughput(value) {
this._throughput = value;
}
resetThroughput() {
this._throughput = undefined;
}
// Temporarily expose input value. Use with caution.
get throughputInput() {
return this._throughput;
}
get volumeSize() {
return this.getNumberAttribute('volume_size');
}
set volumeSize(value) {
this._volumeSize = value;
}
resetVolumeSize() {
this._volumeSize = undefined;
}
// Temporarily expose input value. Use with caution.
get volumeSizeInput() {
return this._volumeSize;
}
get volumeType() {
return this.getStringAttribute('volume_type');
}
set volumeType(value) {
this._volumeType = value;
}
resetVolumeType() {
this._volumeType = undefined;
}
// Temporarily expose input value. Use with caution.
get volumeTypeInput() {
return this._volumeType;
}
}
exports.SpotFleetRequestLaunchSpecificationRootBlockDeviceOutputReference = SpotFleetRequestLaunchSpecificationRootBlockDeviceOutputReference;
_e = JSII_RTTI_SYMBOL_1;
SpotFleetRequestLaunchSpecificationRootBlockDeviceOutputReference[_e] = { fqn: "@cdktf/provider-aws.spotFleetRequest.SpotFleetRequestLaunchSpecificationRootBlockDeviceOutputReference", version: "19.50.0" };
class SpotFleetRequestLaunchSpecificationRootBlockDeviceList 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 SpotFleetRequestLaunchSpecificationRootBlockDeviceOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.SpotFleetRequestLaunchSpecificationRootBlockDeviceList = SpotFleetRequestLaunchSpecificationRootBlockDeviceList;
_f = JSII_RTTI_SYMBOL_1;
SpotFleetRequestLaunchSpecificationRootBlockDeviceList[_f] = { fqn: "@cdktf/provider-aws.spotFleetRequest.SpotFleetRequestLaunchSpecificationRootBlockDeviceList", version: "19.50.0" };
function spotFleetRequestLaunchSpecificationToTerraform(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 {
ami: cdktf.stringToTerraform(struct.ami),
associate_public_ip_address: cdktf.booleanToTerraform(struct.associatePublicIpAddress),
availability_zone: cdktf.stringToTerraform(struct.availabilityZone),
ebs_optimized: cdktf.booleanToTerraform(struct.ebsOptimized),
iam_instance_profile: cdktf.stringToTerraform(struct.iamInstanceProfile),
iam_instance_profile_arn: cdktf.stringToTerraform(struct.iamInstanceProfileArn),
instance_type: cdktf.stringToTerraform(struct.instanceType),
key_name: cdktf.stringToTerraform(struct.keyName),
monitoring: cdktf.booleanToTerraform(struct.monitoring),
placement_group: cdktf.stringToTerraform(struct.placementGroup),
placement_tenancy: cdktf.stringToTerraform(struct.placementTenancy),
spot_price: cdktf.stringToTerraform(struct.spotPrice),
subnet_id: cdktf.stringToTerraform(struct.subnetId),
tags: cdktf.hashMapper(cdktf.stringToTerraform)(struct.tags),
user_data: cdktf.stringToTerraform(struct.userData),
vpc_security_group_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.vpcSecurityGroupIds),
weighted_capacity: cdktf.stringToTerraform(struct.weightedCapacity),
ebs_block_device: cdktf.listMapper(spotFleetRequestLaunchSpecificationEbsBlockDeviceToTerraform, true)(struct.ebsBlockDevice),
ephemeral_block_device: cdktf.listMapper(spotFleetRequestLaunchSpecificationEphemeralBlockDeviceToTerraform, true)(struct.ephemeralBlockDevice),
root_block_device: cdktf.listMapper(spotFleetRequestLaunchSpecificationRootBlockDeviceToTerraform, true)(struct.rootBlockDevice),
};
}
exports.spotFleetRequestLaunchSpecificationToTerraform = spotFleetRequestLaunchSpecificationToTerraform;
function spotFleetRequestLaunchSpecificationToHclTerraform(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 = {
ami: {
value: cdktf.stringToHclTerraform(struct.ami),
isBlock: false,
type: "simple",
storageClassType: "string",
},
associate_public_ip_address: {
value: cdktf.booleanToHclTerraform(struct.associatePublicIpAddress),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
availability_zone: {
value: cdktf.stringToHclTerraform(struct.availabilityZone),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ebs_optimized: {
value: cdktf.booleanToHclTerraform(struct.ebsOptimized),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
iam_instance_profile: {
value: cdktf.stringToHclTerraform(struct.iamInstanceProfile),
isBlock: false,
type: "simple",
storageClassType: "string",
},
iam_instance_profile_arn: {
value: cdktf.stringToHclTerraform(struct.iamInstanceProfileArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
instance_type: {
value: cdktf.stringToHclTerraform(struct.instanceType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
key_name: {
value: cdktf.stringToHclTerraform(struct.keyName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
monitoring: {
value: cdktf.booleanToHclTerraform(struct.monitoring),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
placement_group: {
value: cdktf.stringToHclTerraform(struct.placementGroup),
isBlock: false,
type: "simple",
storageClassType: "string",
},
placement_tenancy: {
value: cdktf.stringToHclTerraform(struct.placementTenancy),
isBlock: false,
type: "simple",
storageClassType: "string",
},
spot_price: {
value: cdktf.stringToHclTerraform(struct.spotPrice),
isBlock: false,
type: "simple",
storageClassType: "string",
},
subnet_id: {
value: cdktf.stringToHclTerraform(struct.subnetId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
tags: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.tags),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
user_data: {
value: cdktf.stringToHclTerraform(struct.userData),
isBlock: false,
type: "simple",
storageClassType: "string",
},
vpc_security_group_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.vpcSecurityGroupIds),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
weighted_capacity: {
value: cdktf.stringToHclTerraform(struct.weightedCapacity),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ebs_block_device: {
value: cdktf.listMapperHcl(spotFleetRequestLaunchSpecificationEbsBlockDeviceToHclTerraform, true)(struct.ebsBlockDevice),
isBlock: true,
type: "set",
storageClassType: "SpotFleetRequestLaunchSpecificationEbsBlockDeviceList",
},
ephemeral_block_device: {
value: cdktf.listMapperHcl(spotFleetRequestLaunchSpecificationEphemeralBlockDeviceToHclTerraform, true)(struct.ephemeralBlockDevice),
isBlock: true,
type: "set",
storageClassType: "SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceList",
},
root_block_device: {
value: cdktf.listMapperHcl(spotFleetRequestLaunchSpecificationRootBlockDeviceToHclTerraform, true)(struct.rootBlockDevice),
isBlock: true,
type: "set",
storageClassType: "SpotFleetRequestLaunchSpecificationRootBlockDeviceList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.spotFleetRequestLaunchSpecificationToHclTerraform = spotFleetRequestLaunchSpecificationToHclTerraform;
class SpotFleetRequestLaunchSpecificationOutputReference 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;
// ebs_block_device - computed: false, optional: true, required: false
this._ebsBlockDevice = new SpotFleetRequestLaunchSpecificationEbsBlockDeviceList(this, "ebs_block_device", true);
// ephemeral_block_device - computed: false, optional: true, required: false
this._ephemeralBlockDevice = new SpotFleetRequestLaunchSpecificationEphemeralBlockDeviceList(this, "ephemeral_block_device", true);
// root_block_device - computed: false, optional: true, required: false
this._rootBlockDevice = new SpotFleetRequestLaunchSpecificationRootBlockDeviceList(this, "root_block_device", true);
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._ami !== undefined) {
hasAnyValues = true;
internalValueResult.ami = this._ami;
}
if (this._associatePublicIpAddress !== undefined) {
hasAnyValues = true;
internalValueResult.associatePublicIpAddress = this._associatePublicIpAddress;
}
if (this._availabilityZone !== undefined) {
hasAnyValues = true;
internalValueResult.availabilityZone = this._availabilityZone;
}
if (this._ebsOptimized !== undefined) {
hasAnyValues = true;
internalValueResult.ebsOptimized = this._ebsOptimized;
}
if (this._iamInstanceProfile !== undefined) {
hasAnyValues = true;
internalValueResult.iamInstanceProfile = this._iamInstanceProfile;
}
if (this._iamInstanceProfileArn !== undefined) {
hasAnyValues = true;
internalValueResult.iamInstanceProfileArn = this._iamInstanceProfileArn;
}
if (this._instanceType !== undefined) {
hasAnyValues = true;
internalValueResult.instanceType = this._instanceType;
}
if (this._keyName !== undefined) {
hasAnyValues = true;
internalValueResult.keyName = this._keyName;
}
if (this._monitoring !== undefined) {
hasAnyValues = true;
internalValueResult.monitoring = this._monitoring;
}
if (this._placementGroup !== undefined) {
hasAnyValues = true;
internalValueResult.placementGroup = this._placementGroup;
}
if (this._placementTenancy !== undefined) {
hasAnyValues = true;
internalValueResult.placementTenancy = this._placementTenancy;
}
if (this._spotPrice !== undefined) {
hasAnyValues = true;
internalValueResult.spotPrice = this._spotPrice;
}
if (this._subnetId !== undefined) {
hasAnyValues = true;
internalValueResult.subnetId = this._subnetId;
}
if (this._tags !== undefined) {
hasAnyValues = true;
internalValueResult.tags = this._tags;
}
if (this._userData !== undefined) {
hasAnyValues = true;
internalValueResult.userData = this._userData;
}
if (this._vpcSecurityGroupIds !== undefined) {
hasAnyValues = true;
internalValueResult.vpcSecurityGroupIds = this._vpcSecurityGroupIds;
}
if (this._weightedCapacity !== undefined) {
hasAnyValues = true;
internalValueResult.weightedCapacity = this._weightedCapacity;
}
if (this._ebsBlockDevice?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.ebsBlockDevice = this._ebsBlockDevice?.internalValue;
}
if (this._ephemeralBlockDevice?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.ephemeralBlockDevice = this._ephemeralBlockDevice?.internalValue;
}
if (this._rootBlockDevice?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.rootBlockDevice = this._rootBlockDevice?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._ami = undefined;
this._associatePublicIpAddress = undefined;
this._availabilityZone = undefined;
this._ebsOptimized = undefined;
this._iamInstanceProfile = undefined;
this._iamInstanceProfileArn = undefined;
this._instanceType = undefined;
this._keyName = undefined;
this._monitoring = undefined;
this._placementGroup = undefined;
this._placementTenancy = undefined;
this._spotPrice = undefined;
this._subnetId = undefined;
this._tags = undefined;
this._userData = undefined;
this._vpcSecurityGroupIds = undefined;
this._weightedCapacity = undefined;
this._ebsBlockDevice.internalValue = undefined;
this._ephemeralBlockDevice.internalValue = undefined;
this._rootBlockDevice.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._ami = value.ami;
this._associatePublicIpAddress = value.associatePublicIpAddress;
this._availabilityZone = value.availabilityZone;
this._ebsOptimized = value.ebsOptimized;
this._iamInstanceProfile = value.iamInstanceProfile;
this._iamInstanceProfileArn = value.iamInstanceProfileArn;
this._instanceType = value.instanceType;
this._keyName = value.keyName;
this._monitoring = value.monitoring;
this._placementGroup = value.placementGroup;
this._placementTenancy = value.placementTenancy;
this._spotPrice = value.spotPrice;
this._subnetId = value.subnetId;
this._tags = value.tags;
this._userData = value.userData;
this._vpcSecurityGroupIds = value.vpcSecurityGroupIds;
this._weightedCapacity = value.weightedCapacity;
this._ebsBlockDevice.internalValue = value.ebsBlockDevice;
this._ephemeralBlockDevice.internalValue = value.ephemeralBlockDevice;
this._rootBlockDevice.internalValue = value.rootBlockDevice;
}
}
get ami() {
return this.getStringAttribute('ami');
}
set ami(value) {
this._ami = value;
}
// Temporarily expose input value. Use with caution.
get amiInput() {
return this._ami;
}
get associatePublicIpAddress() {
return this.getBooleanAttribute('associate_public_ip_address');
}
set associatePublicIpAddress(value) {
this._associatePublicIpAddress = value;
}
resetAssociatePublicIpAddress() {
this._associatePublicIpAddress = undefined;
}
// Temporarily expose input value. Use with caution.
get associatePublicIpAddressInput() {
return this._associatePublicIpAddress;
}
get availabilityZone() {
return this.getStringAttribute('availability_zone');
}
set availabilityZone(value) {
this._availabilityZone = value;
}
resetAvailabilityZone() {
this._availabilityZone = undefined;
}
// Temporarily expose input value. Use with caution.
get availabilityZoneInput() {
return this._availabilityZone;
}
get ebsOptimized() {
return this.getBooleanAttribute('ebs_optimized');
}
set ebsOptimized(value) {
this._ebsOptimized = value;
}
resetEbsOptimized() {
this._ebsOptimize