@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,209 lines • 516 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;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Instance = exports.InstanceTimeoutsOutputReference = exports.InstanceRootBlockDeviceOutputReference = exports.InstancePrivateDnsNameOptionsOutputReference = exports.InstancePrimaryNetworkInterfaceOutputReference = exports.InstanceNetworkInterfaceList = exports.InstanceNetworkInterfaceOutputReference = exports.InstanceMetadataOptionsOutputReference = exports.InstanceMaintenanceOptionsOutputReference = exports.InstanceLaunchTemplateOutputReference = exports.InstanceInstanceMarketOptionsOutputReference = exports.InstanceInstanceMarketOptionsSpotOptionsOutputReference = exports.InstanceEphemeralBlockDeviceList = exports.InstanceEphemeralBlockDeviceOutputReference = exports.InstanceEnclaveOptionsOutputReference = exports.InstanceEbsBlockDeviceList = exports.InstanceEbsBlockDeviceOutputReference = exports.InstanceCreditSpecificationOutputReference = exports.InstanceCpuOptionsOutputReference = exports.InstanceCapacityReservationSpecificationOutputReference = exports.InstanceCapacityReservationSpecificationCapacityReservationTargetOutputReference = void 0;
exports.instanceCapacityReservationSpecificationCapacityReservationTargetToTerraform = instanceCapacityReservationSpecificationCapacityReservationTargetToTerraform;
exports.instanceCapacityReservationSpecificationCapacityReservationTargetToHclTerraform = instanceCapacityReservationSpecificationCapacityReservationTargetToHclTerraform;
exports.instanceCapacityReservationSpecificationToTerraform = instanceCapacityReservationSpecificationToTerraform;
exports.instanceCapacityReservationSpecificationToHclTerraform = instanceCapacityReservationSpecificationToHclTerraform;
exports.instanceCpuOptionsToTerraform = instanceCpuOptionsToTerraform;
exports.instanceCpuOptionsToHclTerraform = instanceCpuOptionsToHclTerraform;
exports.instanceCreditSpecificationToTerraform = instanceCreditSpecificationToTerraform;
exports.instanceCreditSpecificationToHclTerraform = instanceCreditSpecificationToHclTerraform;
exports.instanceEbsBlockDeviceToTerraform = instanceEbsBlockDeviceToTerraform;
exports.instanceEbsBlockDeviceToHclTerraform = instanceEbsBlockDeviceToHclTerraform;
exports.instanceEnclaveOptionsToTerraform = instanceEnclaveOptionsToTerraform;
exports.instanceEnclaveOptionsToHclTerraform = instanceEnclaveOptionsToHclTerraform;
exports.instanceEphemeralBlockDeviceToTerraform = instanceEphemeralBlockDeviceToTerraform;
exports.instanceEphemeralBlockDeviceToHclTerraform = instanceEphemeralBlockDeviceToHclTerraform;
exports.instanceInstanceMarketOptionsSpotOptionsToTerraform = instanceInstanceMarketOptionsSpotOptionsToTerraform;
exports.instanceInstanceMarketOptionsSpotOptionsToHclTerraform = instanceInstanceMarketOptionsSpotOptionsToHclTerraform;
exports.instanceInstanceMarketOptionsToTerraform = instanceInstanceMarketOptionsToTerraform;
exports.instanceInstanceMarketOptionsToHclTerraform = instanceInstanceMarketOptionsToHclTerraform;
exports.instanceLaunchTemplateToTerraform = instanceLaunchTemplateToTerraform;
exports.instanceLaunchTemplateToHclTerraform = instanceLaunchTemplateToHclTerraform;
exports.instanceMaintenanceOptionsToTerraform = instanceMaintenanceOptionsToTerraform;
exports.instanceMaintenanceOptionsToHclTerraform = instanceMaintenanceOptionsToHclTerraform;
exports.instanceMetadataOptionsToTerraform = instanceMetadataOptionsToTerraform;
exports.instanceMetadataOptionsToHclTerraform = instanceMetadataOptionsToHclTerraform;
exports.instanceNetworkInterfaceToTerraform = instanceNetworkInterfaceToTerraform;
exports.instanceNetworkInterfaceToHclTerraform = instanceNetworkInterfaceToHclTerraform;
exports.instancePrimaryNetworkInterfaceToTerraform = instancePrimaryNetworkInterfaceToTerraform;
exports.instancePrimaryNetworkInterfaceToHclTerraform = instancePrimaryNetworkInterfaceToHclTerraform;
exports.instancePrivateDnsNameOptionsToTerraform = instancePrivateDnsNameOptionsToTerraform;
exports.instancePrivateDnsNameOptionsToHclTerraform = instancePrivateDnsNameOptionsToHclTerraform;
exports.instanceRootBlockDeviceToTerraform = instanceRootBlockDeviceToTerraform;
exports.instanceRootBlockDeviceToHclTerraform = instanceRootBlockDeviceToHclTerraform;
exports.instanceTimeoutsToTerraform = instanceTimeoutsToTerraform;
exports.instanceTimeoutsToHclTerraform = instanceTimeoutsToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function instanceCapacityReservationSpecificationCapacityReservationTargetToTerraform(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 instanceCapacityReservationSpecificationCapacityReservationTargetToHclTerraform(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 InstanceCapacityReservationSpecificationCapacityReservationTargetOutputReference 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.InstanceCapacityReservationSpecificationCapacityReservationTargetOutputReference = InstanceCapacityReservationSpecificationCapacityReservationTargetOutputReference;
_a = JSII_RTTI_SYMBOL_1;
InstanceCapacityReservationSpecificationCapacityReservationTargetOutputReference[_a] = { fqn: "@cdktf/provider-aws.instance.InstanceCapacityReservationSpecificationCapacityReservationTargetOutputReference", version: "21.22.1" };
function instanceCapacityReservationSpecificationToTerraform(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: instanceCapacityReservationSpecificationCapacityReservationTargetToTerraform(struct.capacityReservationTarget),
};
}
function instanceCapacityReservationSpecificationToHclTerraform(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: instanceCapacityReservationSpecificationCapacityReservationTargetToHclTerraform(struct.capacityReservationTarget),
isBlock: true,
type: "list",
storageClassType: "InstanceCapacityReservationSpecificationCapacityReservationTargetList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class InstanceCapacityReservationSpecificationOutputReference 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 InstanceCapacityReservationSpecificationCapacityReservationTargetOutputReference(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.InstanceCapacityReservationSpecificationOutputReference = InstanceCapacityReservationSpecificationOutputReference;
_b = JSII_RTTI_SYMBOL_1;
InstanceCapacityReservationSpecificationOutputReference[_b] = { fqn: "@cdktf/provider-aws.instance.InstanceCapacityReservationSpecificationOutputReference", version: "21.22.1" };
function instanceCpuOptionsToTerraform(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 instanceCpuOptionsToHclTerraform(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 InstanceCpuOptionsOutputReference 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.InstanceCpuOptionsOutputReference = InstanceCpuOptionsOutputReference;
_c = JSII_RTTI_SYMBOL_1;
InstanceCpuOptionsOutputReference[_c] = { fqn: "@cdktf/provider-aws.instance.InstanceCpuOptionsOutputReference", version: "21.22.1" };
function instanceCreditSpecificationToTerraform(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 instanceCreditSpecificationToHclTerraform(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 InstanceCreditSpecificationOutputReference 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.InstanceCreditSpecificationOutputReference = InstanceCreditSpecificationOutputReference;
_d = JSII_RTTI_SYMBOL_1;
InstanceCreditSpecificationOutputReference[_d] = { fqn: "@cdktf/provider-aws.instance.InstanceCreditSpecificationOutputReference", version: "21.22.1" };
function instanceEbsBlockDeviceToTerraform(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 instanceEbsBlockDeviceToHclTerraform(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 InstanceEbsBlockDeviceOutputReference 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.InstanceEbsBlockDeviceOutputReference = InstanceEbsBlockDeviceOutputReference;
_e = JSII_RTTI_SYMBOL_1;
InstanceEbsBlockDeviceOutputReference[_e] = { fqn: "@cdktf/provider-aws.instance.InstanceEbsBlockDeviceOutputReference", version: "21.22.1" };
class InstanceEbsBlockDeviceList 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 InstanceEbsBlockDeviceOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.InstanceEbsBlockDeviceList = InstanceEbsBlockDeviceList;
_f = JSII_RTTI_SYMBOL_1;
InstanceEbsBlockDeviceList[_f] = { fqn: "@cdktf/provider-aws.instance.InstanceEbsBlockDeviceList", version: "21.22.1" };
function instanceEnclaveOptionsToTerraform(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 instanceEnclaveOptionsToHclTerraform(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 InstanceEnclaveOptionsOutputReference 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.InstanceEnclaveOptionsOutputReference = InstanceEnclaveOptionsOutputReference;
_g = JSII_RTTI_SYMBOL_1;
InstanceEnclaveOptionsOutputReference[_g] = { fqn: "@cdktf/provider-aws.instance.InstanceEnclaveOptionsOutputReference", version: "21.22.1" };
function instanceEphemeralBlockDeviceToTerraform(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 instanceEphemeralBlockDeviceToHclTerraform(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 InstanceEphemeralBlockDeviceOutputReference 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.InstanceEphemeralBlockDeviceOutputReference = InstanceEphemeralBlockDeviceOutputReference;
_h = JSII_RTTI_SYMBOL_1;
InstanceEphemeralBlockDeviceOutputReference[_h] = { fqn: "@cdktf/provider-aws.instance.InstanceEphemeralBlockDeviceOutputReference", version: "21.22.1" };
class InstanceEphemeralBlockDeviceList 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 InstanceEphemeralBlockDeviceOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.InstanceEphemeralBlockDeviceList = InstanceEphemeralBlockDeviceList;
_j = JSII_RTTI_SYMBOL_1;
InstanceEphemeralBlockDeviceList[_j] = { fqn: "@cdktf/provider-aws.instance.InstanceEphemeralBlockDeviceList", version: "21.22.1" };
function instanceInstanceMarketOptionsSpotOptionsToTerraform(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 {
instance_interruption_behavior: cdktf.stringToTerraform(struct.instanceInterruptionBehavior),
max_price: cdktf.stringToTerraform(struct.maxPrice),
spot_instance_type: cdktf.stringToTerraform(struct.spotInstanceType),
valid_until: cdktf.stringToTerraform(struct.validUntil),
};
}
function instanceInstanceMarketOptionsSpotOptionsToHclTerraform(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 = {
instance_interruption_behavior: {
value: cdktf.stringToHclTerraform(struct.instanceInterruptionBehavior),
isBlock: false,
type: "simple",
storageClassType: "string",
},
max_price: {
value: cdktf.stringToHclTerraform(struct.maxPrice),
isBlock: false,
type: "simple",
storageClassType: "string",
},
spot_instance_type: {
value: cdktf.stringToHclTerraform(struct.spotInstanceType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
valid_until: {
value: cdktf.stringToHclTerraform(struct.validUntil),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class InstanceInstanceMarketOptionsSpotOptionsOutputReference 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._instanceInterruptionBehavior !== undefined) {
hasAnyValues = true;
internalValueResult.instanceInterruptionBehavior = this._instanceInterruptionBehavior;
}
if (this._maxPrice !== undefined) {
hasAnyValues = true;
internalValueResult.maxPrice = this._maxPrice;
}
if (this._spotInstanceType !== undefined) {
hasAnyValues = true;
internalValueResult.spotInstanceType = this._spotInstanceType;
}
if (this._validUntil !== undefined) {
hasAnyValues = true;
internalValueResult.validUntil = this._validUntil;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._instanceInterruptionBehavior = undefined;
this._maxPrice = undefined;
this._spotInstanceType = undefined;
this._validUntil = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._instanceInterruptionBehavior = value.instanceInterruptionBehavior;
this._maxPrice = value.maxPrice;
this._spotInstanceType = value.spotInstanceType;
this._validUntil = value.validUntil;
}
}
get instanceInterruptionBehavior() {
return this.getStringAttribute('instance_interruption_behavior');
}
set instanceInterruptionBehavior(value) {
this._instanceInterruptionBehavior = value;
}
resetInstanceInterruptionBehavior() {
this._instanceInterruptionBehavior = undefined;
}
// Temporarily expose input value. Use with caution.
get instanceInterruptionBehaviorInput() {
return this._instanceInterruptionBehavior;
}
get maxPrice() {
return this.getStringAttribute('max_price');
}
set maxPrice(value) {
this._maxPrice = value;
}
resetMaxPrice() {
this._maxPrice = undefined;
}
// Temporarily expose input value. Use with caution.
get maxPriceInput() {
return this._maxPrice;
}
get spotInstanceType() {
return this.getStringAttribute('spot_instance_type');
}
set spotInstanceType(value) {
this._spotInstanceType = value;
}
resetSpotInstanceType() {
this._spotInstanceType = undefined;
}
// Temporarily expose input value. Use with caution.
get spotInstanceTypeInput() {
return this._spotInstanceType;
}
get validUntil() {
return this.getStringAttribute('valid_until');
}
set validUntil(value) {
this._validUntil = value;
}
resetValidUntil() {
this._validUntil = undefined;
}
// Temporarily expose input value. Use with caution.
get validUntilInput() {
return this._validUntil;
}
}
exports.InstanceInstanceMarketOptionsSpotOptionsOutputReference = InstanceInstanceMarketOptionsSpotOptionsOutputReference;
_k = JSII_RTTI_SYMBOL_1;
InstanceInstanceMarketOptionsSpotOptionsOutputReference[_k] = { fqn: "@cdktf/provider-aws.instance.InstanceInstanceMarketOptionsSpotOptionsOutputReference", version: "21.22.1" };
function instanceInstanceMarketOptionsToTerraform(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 {
market_type: cdktf.stringToTerraform(struct.marketType),
spot_options: instanceInstanceMarketOptionsSpotOptionsToTerraform(struct.spotOptions),
};
}
function instanceInstanceMarketOptionsToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComp