@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,155 lines • 498 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;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpotInstanceRequest = exports.SpotInstanceRequestTimeoutsOutputReference = exports.SpotInstanceRequestRootBlockDeviceOutputReference = exports.SpotInstanceRequestPrivateDnsNameOptionsOutputReference = exports.SpotInstanceRequestNetworkInterfaceList = exports.SpotInstanceRequestNetworkInterfaceOutputReference = exports.SpotInstanceRequestMetadataOptionsOutputReference = exports.SpotInstanceRequestMaintenanceOptionsOutputReference = exports.SpotInstanceRequestLaunchTemplateOutputReference = exports.SpotInstanceRequestEphemeralBlockDeviceList = exports.SpotInstanceRequestEphemeralBlockDeviceOutputReference = exports.SpotInstanceRequestEnclaveOptionsOutputReference = exports.SpotInstanceRequestEbsBlockDeviceList = exports.SpotInstanceRequestEbsBlockDeviceOutputReference = exports.SpotInstanceRequestCreditSpecificationOutputReference = exports.SpotInstanceRequestCpuOptionsOutputReference = exports.SpotInstanceRequestCapacityReservationSpecificationOutputReference = exports.SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetOutputReference = exports.SpotInstanceRequestPrimaryNetworkInterfaceList = exports.SpotInstanceRequestPrimaryNetworkInterfaceOutputReference = void 0;
exports.spotInstanceRequestPrimaryNetworkInterfaceToTerraform = spotInstanceRequestPrimaryNetworkInterfaceToTerraform;
exports.spotInstanceRequestPrimaryNetworkInterfaceToHclTerraform = spotInstanceRequestPrimaryNetworkInterfaceToHclTerraform;
exports.spotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetToTerraform = spotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetToTerraform;
exports.spotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetToHclTerraform = spotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetToHclTerraform;
exports.spotInstanceRequestCapacityReservationSpecificationToTerraform = spotInstanceRequestCapacityReservationSpecificationToTerraform;
exports.spotInstanceRequestCapacityReservationSpecificationToHclTerraform = spotInstanceRequestCapacityReservationSpecificationToHclTerraform;
exports.spotInstanceRequestCpuOptionsToTerraform = spotInstanceRequestCpuOptionsToTerraform;
exports.spotInstanceRequestCpuOptionsToHclTerraform = spotInstanceRequestCpuOptionsToHclTerraform;
exports.spotInstanceRequestCreditSpecificationToTerraform = spotInstanceRequestCreditSpecificationToTerraform;
exports.spotInstanceRequestCreditSpecificationToHclTerraform = spotInstanceRequestCreditSpecificationToHclTerraform;
exports.spotInstanceRequestEbsBlockDeviceToTerraform = spotInstanceRequestEbsBlockDeviceToTerraform;
exports.spotInstanceRequestEbsBlockDeviceToHclTerraform = spotInstanceRequestEbsBlockDeviceToHclTerraform;
exports.spotInstanceRequestEnclaveOptionsToTerraform = spotInstanceRequestEnclaveOptionsToTerraform;
exports.spotInstanceRequestEnclaveOptionsToHclTerraform = spotInstanceRequestEnclaveOptionsToHclTerraform;
exports.spotInstanceRequestEphemeralBlockDeviceToTerraform = spotInstanceRequestEphemeralBlockDeviceToTerraform;
exports.spotInstanceRequestEphemeralBlockDeviceToHclTerraform = spotInstanceRequestEphemeralBlockDeviceToHclTerraform;
exports.spotInstanceRequestLaunchTemplateToTerraform = spotInstanceRequestLaunchTemplateToTerraform;
exports.spotInstanceRequestLaunchTemplateToHclTerraform = spotInstanceRequestLaunchTemplateToHclTerraform;
exports.spotInstanceRequestMaintenanceOptionsToTerraform = spotInstanceRequestMaintenanceOptionsToTerraform;
exports.spotInstanceRequestMaintenanceOptionsToHclTerraform = spotInstanceRequestMaintenanceOptionsToHclTerraform;
exports.spotInstanceRequestMetadataOptionsToTerraform = spotInstanceRequestMetadataOptionsToTerraform;
exports.spotInstanceRequestMetadataOptionsToHclTerraform = spotInstanceRequestMetadataOptionsToHclTerraform;
exports.spotInstanceRequestNetworkInterfaceToTerraform = spotInstanceRequestNetworkInterfaceToTerraform;
exports.spotInstanceRequestNetworkInterfaceToHclTerraform = spotInstanceRequestNetworkInterfaceToHclTerraform;
exports.spotInstanceRequestPrivateDnsNameOptionsToTerraform = spotInstanceRequestPrivateDnsNameOptionsToTerraform;
exports.spotInstanceRequestPrivateDnsNameOptionsToHclTerraform = spotInstanceRequestPrivateDnsNameOptionsToHclTerraform;
exports.spotInstanceRequestRootBlockDeviceToTerraform = spotInstanceRequestRootBlockDeviceToTerraform;
exports.spotInstanceRequestRootBlockDeviceToHclTerraform = spotInstanceRequestRootBlockDeviceToHclTerraform;
exports.spotInstanceRequestTimeoutsToTerraform = spotInstanceRequestTimeoutsToTerraform;
exports.spotInstanceRequestTimeoutsToHclTerraform = spotInstanceRequestTimeoutsToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function spotInstanceRequestPrimaryNetworkInterfaceToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {};
}
function spotInstanceRequestPrimaryNetworkInterfaceToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {};
return attrs;
}
class SpotInstanceRequestPrimaryNetworkInterfaceOutputReference 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;
}
}
// delete_on_termination - computed: true, optional: false, required: false
get deleteOnTermination() {
return this.getBooleanAttribute('delete_on_termination');
}
// network_interface_id - computed: true, optional: false, required: false
get networkInterfaceId() {
return this.getStringAttribute('network_interface_id');
}
}
exports.SpotInstanceRequestPrimaryNetworkInterfaceOutputReference = SpotInstanceRequestPrimaryNetworkInterfaceOutputReference;
_a = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestPrimaryNetworkInterfaceOutputReference[_a] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestPrimaryNetworkInterfaceOutputReference", version: "21.22.1" };
class SpotInstanceRequestPrimaryNetworkInterfaceList 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 SpotInstanceRequestPrimaryNetworkInterfaceOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.SpotInstanceRequestPrimaryNetworkInterfaceList = SpotInstanceRequestPrimaryNetworkInterfaceList;
_b = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestPrimaryNetworkInterfaceList[_b] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestPrimaryNetworkInterfaceList", version: "21.22.1" };
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),
};
}
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));
}
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;
_c = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetOutputReference[_c] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestCapacityReservationSpecificationCapacityReservationTargetOutputReference", version: "21.22.1" };
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),
};
}
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));
}
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;
_d = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestCapacityReservationSpecificationOutputReference[_d] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestCapacityReservationSpecificationOutputReference", version: "21.22.1" };
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),
};
}
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));
}
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;
_e = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestCpuOptionsOutputReference[_e] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestCpuOptionsOutputReference", version: "21.22.1" };
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),
};
}
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));
}
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;
_f = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestCreditSpecificationOutputReference[_f] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestCreditSpecificationOutputReference", version: "21.22.1" };
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),
};
}
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));
}
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;
_g = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestEbsBlockDeviceOutputReference[_g] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestEbsBlockDeviceOutputReference", version: "21.22.1" };
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;
_h = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestEbsBlockDeviceList[_h] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestEbsBlockDeviceList", version: "21.22.1" };
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),
};
}
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));
}
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;
_j = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestEnclaveOptionsOutputReference[_j] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestEnclaveOptionsOutputReference", version: "21.22.1" };
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),
};
}
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));
}
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;
_k = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestEphemeralBlockDeviceOutputReference[_k] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestEphemeralBlockDeviceOutputReference", version: "21.22.1" };
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;
_l = JSII_RTTI_SYMBOL_1;
SpotInstanceRequestEphemeralBlockDeviceList[_l] = { fqn: "@cdktf/provider-aws.spotInstanceRequest.SpotInstanceRequestEphemeralBlockDeviceList", version: "21.22.1" };
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),
};
}
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)