@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,171 lines • 491 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpotInstanceRequest = exports.SpotInstanceRequestTimeoutsOutputReference = exports.spotInstanceRequestTimeoutsToHclTerraform = exports.spotInstanceRequestTimeoutsToTerraform = exports.SpotInstanceRequestRootBlockDeviceOutputReference = exports.spotInstanceRequestRootBlockDeviceToHclTerraform = exports.spotInstanceRequestRootBlockDeviceToTerraform = exports.SpotInstanceRequestPrivateDnsNameOptionsOutputReference = exports.spotInstanceRequestPrivateDnsNameOptionsToHclTerraform = exports.spotInstanceRequestPrivateDnsNameOptionsToTerraform = exports.SpotInstanceRequestNetworkInterfaceList = exports.SpotInstanceRequestNetworkInterfaceOutputReference = exports.spotInstanceRequestNetworkInterfaceToHclTerraform = exports.spotInstanceRequestNetworkInterfaceToTerraform = exports.SpotInstanceRequestMetadataOptionsOutputReference = exports.spotInstanceRequestMetadataOptionsToHclTerraform = exports.spotInstanceRequestMetadataOptionsToTerraform = exports.SpotInstanceRequestMaintenanceOptionsOutputReference = exports.spotInstanceRequestMaintenanceOptionsToHclTerraform = exports.spotInstanceRequestMaintenanceOptionsToTerraform = exports.SpotInstanceRequestLaunchTemplateOutputReference = exports.spotInstanceRequestLaunchTemplateToHclTerraform = exports.spotInstanceRequestLaunchTemplateToTerraform = exports.SpotInstanceRequestEphemeralBlockDeviceList = exports.SpotInstanceRequestEphemeralBlockDeviceOutputReference = exports.spotInstanceRequestEphemeralBlockDeviceToHclTerraform = exports.spotInstanceRequestEphemeralBlockDeviceToTerraform = exports.SpotInstanceRequestEnclaveOptionsOutputReference = exports.spotInstanceRequestEnclaveOptionsToHclTerraform = exports.spotInstanceRequestEnclaveOptionsToTerraform = exports.SpotInstanceRequestEbsBlockDeviceList = exports.SpotInstanceRequestEbsBlockDeviceOutputReference = exports.spotInstanceRequestEbsBlockDeviceToHclTerraform = exports.spotInstanceRequestEbsBlockDeviceToTerraform = exports.SpotInstanceRequestCreditSpecificationOutputReference = exports.spotInstanceRequestCreditSpecificationToHclTerraform = exports.spotInstanceRequestCreditSpecificationToTerraform = exports.SpotInstanceRequestCpuOptionsOutputReference = exports.spotInstanceRequestCpuOptionsToHclTerraform = exports.spotInstanceRequestCpuOptionsToTerraform = exports.SpotInstanceRequestCapacityReservationSpecificationOutputReference = exports.spotInstanceRequestCapacityReservationSpecificationToHclTerraform = exports.spotInstanceRequestCapacityReservationSpecificationToTerraform = exports.SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetOutputReference = exports.spotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetToHclTerraform = exports.spotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function spotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetToTerraform(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 {
capacity_reservation_id: cdktf.stringToTerraform(struct.capacityReservationId),
capacity_reservation_resource_group_arn: cdktf.stringToTerraform(struct.capacityReservationResourceGroupArn),
};
}
exports.spotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetToTerraform = spotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetToTerraform;
function spotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetToHclTerraform(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 = {
capacity_reservation_id: {
value: cdktf.stringToHclTerraform(struct.capacityReservationId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
capacity_reservation_resource_group_arn: {
value: cdktf.stringToHclTerraform(struct.capacityReservationResourceGroupArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.spotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetToHclTerraform = spotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetToHclTerraform;
class SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetOutputReference 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._capacityReservationId !== undefined) {
hasAnyValues = true;
internalValueResult.capacityReservationId = this._capacityReservationId;
}
if (this._capacityReservationResourceGroupArn !== undefined) {
hasAnyValues = true;
internalValueResult.capacityReservationResourceGroupArn = this._capacityReservationResourceGroupArn;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._capacityReservationId = undefined;
this._capacityReservationResourceGroupArn = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._capacityReservationId = value.capacityReservationId;
this._capacityReservationResourceGroupArn = value.capacityReservationResourceGroupArn;
}
}
get capacityReservationId() {
return this.getStringAttribute('capacity_reservation_id');
}
set capacityReservationId(value) {
this._capacityReservationId = value;
}
resetCapacityReservationId() {
this._capacityReservationId = undefined;
}
// Temporarily expose input value. Use with caution.
get capacityReservationIdInput() {
return this._capacityReservationId;
}
get capacityReservationResourceGroupArn() {
return this.getStringAttribute('capacity_reservation_resource_group_arn');
}
set capacityReservationResourceGroupArn(value) {
this._capacityReservationResourceGroupArn = value;
}
resetCapacityReservationResourceGroupArn() {
this._capacityReservationResourceGroupArn = undefined;
}
// Temporarily expose input value. Use with caution.
get capacityReservationResourceGroupArnInput() {
return this._capacityReservationResourceGroupArn;
}
}
exports.SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetOutputReference = SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetOutputReference;
_a = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetOutputReference[_a] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetOutputReference", version: "19.50.0" };
function spotInstanceRequestCapacityReservationSpecificationToTerraform(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 {
capacity_reservation_preference: cdktf.stringToTerraform(struct.capacityReservationPreference),
capacity_reservation_target: spotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetToTerraform(struct.capacityReservationTarget),
};
}
exports.spotInstanceRequestCapacityReservationSpecificationToTerraform = spotInstanceRequestCapacityReservationSpecificationToTerraform;
function spotInstanceRequestCapacityReservationSpecificationToHclTerraform(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 = {
capacity_reservation_preference: {
value: cdktf.stringToHclTerraform(struct.capacityReservationPreference),
isBlock: false,
type: "simple",
storageClassType: "string",
},
capacity_reservation_target: {
value: spotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetToHclTerraform(struct.capacityReservationTarget),
isBlock: true,
type: "list",
storageClassType: "SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.spotInstanceRequestCapacityReservationSpecificationToHclTerraform = spotInstanceRequestCapacityReservationSpecificationToHclTerraform;
class SpotInstanceRequestCapacityReservationSpecificationOutputReference 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;
// capacity_reservation_target - computed: false, optional: true, required: false
this._capacityReservationTarget = new SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetOutputReference(this, "capacity_reservation_target");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._capacityReservationPreference !== undefined) {
hasAnyValues = true;
internalValueResult.capacityReservationPreference = this._capacityReservationPreference;
}
if (this._capacityReservationTarget?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.capacityReservationTarget = this._capacityReservationTarget?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._capacityReservationPreference = undefined;
this._capacityReservationTarget.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._capacityReservationPreference = value.capacityReservationPreference;
this._capacityReservationTarget.internalValue = value.capacityReservationTarget;
}
}
get capacityReservationPreference() {
return this.getStringAttribute('capacity_reservation_preference');
}
set capacityReservationPreference(value) {
this._capacityReservationPreference = value;
}
resetCapacityReservationPreference() {
this._capacityReservationPreference = undefined;
}
// Temporarily expose input value. Use with caution.
get capacityReservationPreferenceInput() {
return this._capacityReservationPreference;
}
get capacityReservationTarget() {
return this._capacityReservationTarget;
}
putCapacityReservationTarget(value) {
this._capacityReservationTarget.internalValue = value;
}
resetCapacityReservationTarget() {
this._capacityReservationTarget.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get capacityReservationTargetInput() {
return this._capacityReservationTarget.internalValue;
}
}
exports.SpotInstanceRequestCapacityReservationSpecificationOutputReference = SpotInstanceRequestCapacityReservationSpecificationOutputReference;
_b = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestCapacityReservationSpecificationOutputReference[_b] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestCapacityReservationSpecificationOutputReference", version: "19.50.0" };
function spotInstanceRequestCpuOptionsToTerraform(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 {
amd_sev_snp: cdktf.stringToTerraform(struct.amdSevSnp),
core_count: cdktf.numberToTerraform(struct.coreCount),
threads_per_core: cdktf.numberToTerraform(struct.threadsPerCore),
};
}
exports.spotInstanceRequestCpuOptionsToTerraform = spotInstanceRequestCpuOptionsToTerraform;
function spotInstanceRequestCpuOptionsToHclTerraform(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 = {
amd_sev_snp: {
value: cdktf.stringToHclTerraform(struct.amdSevSnp),
isBlock: false,
type: "simple",
storageClassType: "string",
},
core_count: {
value: cdktf.numberToHclTerraform(struct.coreCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
threads_per_core: {
value: cdktf.numberToHclTerraform(struct.threadsPerCore),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.spotInstanceRequestCpuOptionsToHclTerraform = spotInstanceRequestCpuOptionsToHclTerraform;
class SpotInstanceRequestCpuOptionsOutputReference 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._amdSevSnp !== undefined) {
hasAnyValues = true;
internalValueResult.amdSevSnp = this._amdSevSnp;
}
if (this._coreCount !== undefined) {
hasAnyValues = true;
internalValueResult.coreCount = this._coreCount;
}
if (this._threadsPerCore !== undefined) {
hasAnyValues = true;
internalValueResult.threadsPerCore = this._threadsPerCore;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._amdSevSnp = undefined;
this._coreCount = undefined;
this._threadsPerCore = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._amdSevSnp = value.amdSevSnp;
this._coreCount = value.coreCount;
this._threadsPerCore = value.threadsPerCore;
}
}
get amdSevSnp() {
return this.getStringAttribute('amd_sev_snp');
}
set amdSevSnp(value) {
this._amdSevSnp = value;
}
resetAmdSevSnp() {
this._amdSevSnp = undefined;
}
// Temporarily expose input value. Use with caution.
get amdSevSnpInput() {
return this._amdSevSnp;
}
get coreCount() {
return this.getNumberAttribute('core_count');
}
set coreCount(value) {
this._coreCount = value;
}
resetCoreCount() {
this._coreCount = undefined;
}
// Temporarily expose input value. Use with caution.
get coreCountInput() {
return this._coreCount;
}
get threadsPerCore() {
return this.getNumberAttribute('threads_per_core');
}
set threadsPerCore(value) {
this._threadsPerCore = value;
}
resetThreadsPerCore() {
this._threadsPerCore = undefined;
}
// Temporarily expose input value. Use with caution.
get threadsPerCoreInput() {
return this._threadsPerCore;
}
}
exports.SpotInstanceRequestCpuOptionsOutputReference = SpotInstanceRequestCpuOptionsOutputReference;
_c = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestCpuOptionsOutputReference[_c] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestCpuOptionsOutputReference", version: "19.50.0" };
function spotInstanceRequestCreditSpecificationToTerraform(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 {
cpu_credits: cdktf.stringToTerraform(struct.cpuCredits),
};
}
exports.spotInstanceRequestCreditSpecificationToTerraform = spotInstanceRequestCreditSpecificationToTerraform;
function spotInstanceRequestCreditSpecificationToHclTerraform(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 = {
cpu_credits: {
value: cdktf.stringToHclTerraform(struct.cpuCredits),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.spotInstanceRequestCreditSpecificationToHclTerraform = spotInstanceRequestCreditSpecificationToHclTerraform;
class SpotInstanceRequestCreditSpecificationOutputReference 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._cpuCredits !== undefined) {
hasAnyValues = true;
internalValueResult.cpuCredits = this._cpuCredits;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._cpuCredits = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._cpuCredits = value.cpuCredits;
}
}
get cpuCredits() {
return this.getStringAttribute('cpu_credits');
}
set cpuCredits(value) {
this._cpuCredits = value;
}
resetCpuCredits() {
this._cpuCredits = undefined;
}
// Temporarily expose input value. Use with caution.
get cpuCreditsInput() {
return this._cpuCredits;
}
}
exports.SpotInstanceRequestCreditSpecificationOutputReference = SpotInstanceRequestCreditSpecificationOutputReference;
_d = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestCreditSpecificationOutputReference[_d] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestCreditSpecificationOutputReference", version: "19.50.0" };
function spotInstanceRequestEbsBlockDeviceToTerraform(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),
tags: cdktf.hashMapper(cdktf.stringToTerraform)(struct.tags),
tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(struct.tagsAll),
throughput: cdktf.numberToTerraform(struct.throughput),
volume_size: cdktf.numberToTerraform(struct.volumeSize),
volume_type: cdktf.stringToTerraform(struct.volumeType),
};
}
exports.spotInstanceRequestEbsBlockDeviceToTerraform = spotInstanceRequestEbsBlockDeviceToTerraform;
function spotInstanceRequestEbsBlockDeviceToHclTerraform(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",
},
tags: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.tags),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
tags_all: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.tagsAll),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
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.spotInstanceRequestEbsBlockDeviceToHclTerraform = spotInstanceRequestEbsBlockDeviceToHclTerraform;
class SpotInstanceRequestEbsBlockDeviceOutputReference 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._tags !== undefined) {
hasAnyValues = true;
internalValueResult.tags = this._tags;
}
if (this._tagsAll !== undefined) {
hasAnyValues = true;
internalValueResult.tagsAll = this._tagsAll;
}
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._tags = undefined;
this._tagsAll = 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._tags = value.tags;
this._tagsAll = value.tagsAll;
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 tags() {
return this.getStringMapAttribute('tags');
}
set tags(value) {
this._tags = value;
}
resetTags() {
this._tags = undefined;
}
// Temporarily expose input value. Use with caution.
get tagsInput() {
return this._tags;
}
get tagsAll() {
return this.getStringMapAttribute('tags_all');
}
set tagsAll(value) {
this._tagsAll = value;
}
resetTagsAll() {
this._tagsAll = undefined;
}
// Temporarily expose input value. Use with caution.
get tagsAllInput() {
return this._tagsAll;
}
get 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;
}
// volume_id - computed: true, optional: false, required: false
get volumeId() {
return this.getStringAttribute('volume_id');
}
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.SpotInstanceRequestEbsBlockDeviceOutputReference = SpotInstanceRequestEbsBlockDeviceOutputReference;
_e = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestEbsBlockDeviceOutputReference[_e] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestEbsBlockDeviceOutputReference", version: "19.50.0" };
class SpotInstanceRequestEbsBlockDeviceList 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 SpotInstanceRequestEbsBlockDeviceOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.SpotInstanceRequestEbsBlockDeviceList = SpotInstanceRequestEbsBlockDeviceList;
_f = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestEbsBlockDeviceList[_f] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestEbsBlockDeviceList", version: "19.50.0" };
function spotInstanceRequestEnclaveOptionsToTerraform(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 {
enabled: cdktf.booleanToTerraform(struct.enabled),
};
}
exports.spotInstanceRequestEnclaveOptionsToTerraform = spotInstanceRequestEnclaveOptionsToTerraform;
function spotInstanceRequestEnclaveOptionsToHclTerraform(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 = {
enabled: {
value: cdktf.booleanToHclTerraform(struct.enabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.spotInstanceRequestEnclaveOptionsToHclTerraform = spotInstanceRequestEnclaveOptionsToHclTerraform;
class SpotInstanceRequestEnclaveOptionsOutputReference 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._enabled !== undefined) {
hasAnyValues = true;
internalValueResult.enabled = this._enabled;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._enabled = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._enabled = value.enabled;
}
}
get enabled() {
return this.getBooleanAttribute('enabled');
}
set enabled(value) {
this._enabled = value;
}
resetEnabled() {
this._enabled = undefined;
}
// Temporarily expose input value. Use with caution.
get enabledInput() {
return this._enabled;
}
}
exports.SpotInstanceRequestEnclaveOptionsOutputReference = SpotInstanceRequestEnclaveOptionsOutputReference;
_g = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestEnclaveOptionsOutputReference[_g] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestEnclaveOptionsOutputReference", version: "19.50.0" };
function spotInstanceRequestEphemeralBlockDeviceToTerraform(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),
no_device: cdktf.booleanToTerraform(struct.noDevice),
virtual_name: cdktf.stringToTerraform(struct.virtualName),
};
}
exports.spotInstanceRequestEphemeralBlockDeviceToTerraform = spotInstanceRequestEphemeralBlockDeviceToTerraform;
function spotInstanceRequestEphemeralBlockDeviceToHclTerraform(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",
},
no_device: {
value: cdktf.booleanToHclTerraform(struct.noDevice),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
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.spotInstanceRequestEphemeralBlockDeviceToHclTerraform = spotInstanceRequestEphemeralBlockDeviceToHclTerraform;
class SpotInstanceRequestEphemeralBlockDeviceOutputReference 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._noDevice !== undefined) {
hasAnyValues = true;
internalValueResult.noDevice = this._noDevice;
}
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._noDevice = 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._noDevice = value.noDevice;
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 noDevice() {
return this.getBooleanAttribute('no_device');
}
set noDevice(value) {
this._noDevice = value;
}
resetNoDevice() {
this._noDevice = undefined;
}
// Temporarily expose input value. Use with caution.
get noDeviceInput() {
return this._noDevice;
}
get virtualName() {
return this.getStringAttribute('virtual_name');
}
set virtualName(value) {
this._virtualName = value;
}
resetVirtualName() {
this._virtualName = undefined;
}
// Temporarily expose input value. Use with caution.
get virtualNameInput() {
return this._virtualName;
}
}
exports.SpotInstanceRequestEphemeralBlockDeviceOutputReference = SpotInstanceRequestEphemeralBlockDeviceOutputReference;
_h = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestEphemeralBlockDeviceOutputReference[_h] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestEphemeralBlockDeviceOutputReference", version: "19.50.0" };
class SpotInstanceRequestEphemeralBlockDeviceList 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 SpotInstanceRequestEphemeralBlockDeviceOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.SpotInstanceRequestEphemeralBlockDeviceList = SpotInstanceRequestEphemeralBlockDeviceList;
_j = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestEphemeralBlockDeviceList[_j] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestEphemeralBlockDeviceList", version: "19.50.0" };
function spotInstanceRequestLaunchTemplateToTerraform(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 {
id: cdktf.stringToTerraform(struct.id),
name: cdktf.stringToTerraform(struct.name),
version: cdktf.stringToTerraform(struct.version),
};
}
exports.spotInstanceRequestLaunchTemplateToTerraform = spotInstanceRequestLaunchTemplateToTerraform;
function spotInstanceRequestLaunchTemplateToHclTerraform(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 = {
id: {
value: cdktf.stringToHclTerraform(struct.id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(struct.name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
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.spotInstanceRequestLaunchTemplateToHclTerraform = spotInstanceRequestLaunchTemplateToHclTerraform;
class SpotInstanceRequestLaunchTemplateOutputReference 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._id !== undefined) {
hasAnyValues = true;
internalValueResult.id = this._id;
}
if (this._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
if (this._version !== undefined) {
hasAnyValues = true;
internalValueResult.version = this._version;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._id = undefined;
this._name = undefined;
this._version = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._id = value.id;
this._name = value.name;
this._version = value.version;
}
}
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 name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
resetName() {
this._name = undefined;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
get version() {
return this.getStringAttribute('version');
}
set version(value) {
this._version = value;
}
resetVersion() {
this._version = undefined;
}
// Temporarily expose input value. Use with caution.
get versionInput() {
return this._version;
}
}
exports.SpotInstanceRequestLaunchTemplateOutputReference = SpotInstanceRequestLaunchTemplateOutputReference;
_k = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestLaunchTemplateOutputReference[_k] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestLaunchTemplateOutputReference", version: "19.50.0" };
function spotInstanceRequestMaintenanceOptionsToTerraform(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 {
auto_recovery: cdktf.stringToTerraform(struct.autoRecovery),
};
}
exports.spotInstanceRequestMaintenanceOptionsToTerraform = spotInstanceRequestMaintenanceOptionsToTerraform;
function spotInstanceRequestMaintenanceOptionsToHclTerraform(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 = {
auto_recovery: {
value: cdktf.stringToHclTerraform(struct.autoRecovery),
isBlock: fa