@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,307 lines • 179 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g;
Object.defineProperty(exports, "__esModule", { value: true });
exports.LaunchConfiguration = exports.LaunchConfigurationRootBlockDeviceOutputReference = exports.LaunchConfigurationMetadataOptionsOutputReference = exports.LaunchConfigurationEphemeralBlockDeviceList = exports.LaunchConfigurationEphemeralBlockDeviceOutputReference = exports.LaunchConfigurationEbsBlockDeviceList = exports.LaunchConfigurationEbsBlockDeviceOutputReference = void 0;
exports.launchConfigurationEbsBlockDeviceToTerraform = launchConfigurationEbsBlockDeviceToTerraform;
exports.launchConfigurationEbsBlockDeviceToHclTerraform = launchConfigurationEbsBlockDeviceToHclTerraform;
exports.launchConfigurationEphemeralBlockDeviceToTerraform = launchConfigurationEphemeralBlockDeviceToTerraform;
exports.launchConfigurationEphemeralBlockDeviceToHclTerraform = launchConfigurationEphemeralBlockDeviceToHclTerraform;
exports.launchConfigurationMetadataOptionsToTerraform = launchConfigurationMetadataOptionsToTerraform;
exports.launchConfigurationMetadataOptionsToHclTerraform = launchConfigurationMetadataOptionsToHclTerraform;
exports.launchConfigurationRootBlockDeviceToTerraform = launchConfigurationRootBlockDeviceToTerraform;
exports.launchConfigurationRootBlockDeviceToHclTerraform = launchConfigurationRootBlockDeviceToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function launchConfigurationEbsBlockDeviceToTerraform(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),
no_device: cdktf.booleanToTerraform(struct.noDevice),
snapshot_id: cdktf.stringToTerraform(struct.snapshotId),
throughput: cdktf.numberToTerraform(struct.throughput),
volume_size: cdktf.numberToTerraform(struct.volumeSize),
volume_type: cdktf.stringToTerraform(struct.volumeType),
};
}
function launchConfigurationEbsBlockDeviceToHclTerraform(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",
},
no_device: {
value: cdktf.booleanToHclTerraform(struct.noDevice),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
snapshot_id: {
value: cdktf.stringToHclTerraform(struct.snapshotId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
throughput: {
value: cdktf.numberToHclTerraform(struct.throughput),
isBlock: false,
type: "simple",
storageClassType: "number",
},
volume_size: {
value: cdktf.numberToHclTerraform(struct.volumeSize),
isBlock: false,
type: "simple",
storageClassType: "number",
},
volume_type: {
value: cdktf.stringToHclTerraform(struct.volumeType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class LaunchConfigurationEbsBlockDeviceOutputReference 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._noDevice !== undefined) {
hasAnyValues = true;
internalValueResult.noDevice = this._noDevice;
}
if (this._snapshotId !== undefined) {
hasAnyValues = true;
internalValueResult.snapshotId = this._snapshotId;
}
if (this._throughput !== undefined) {
hasAnyValues = true;
internalValueResult.throughput = this._throughput;
}
if (this._volumeSize !== undefined) {
hasAnyValues = true;
internalValueResult.volumeSize = this._volumeSize;
}
if (this._volumeType !== undefined) {
hasAnyValues = true;
internalValueResult.volumeType = this._volumeType;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._deleteOnTermination = undefined;
this._deviceName = undefined;
this._encrypted = undefined;
this._iops = undefined;
this._noDevice = undefined;
this._snapshotId = undefined;
this._throughput = undefined;
this._volumeSize = undefined;
this._volumeType = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._deleteOnTermination = value.deleteOnTermination;
this._deviceName = value.deviceName;
this._encrypted = value.encrypted;
this._iops = value.iops;
this._noDevice = value.noDevice;
this._snapshotId = value.snapshotId;
this._throughput = value.throughput;
this._volumeSize = value.volumeSize;
this._volumeType = value.volumeType;
}
}
get deleteOnTermination() {
return this.getBooleanAttribute('delete_on_termination');
}
set deleteOnTermination(value) {
this._deleteOnTermination = value;
}
resetDeleteOnTermination() {
this._deleteOnTermination = undefined;
}
// Temporarily expose input value. Use with caution.
get deleteOnTerminationInput() {
return this._deleteOnTermination;
}
get deviceName() {
return this.getStringAttribute('device_name');
}
set deviceName(value) {
this._deviceName = value;
}
// Temporarily expose input value. Use with caution.
get deviceNameInput() {
return this._deviceName;
}
get encrypted() {
return this.getBooleanAttribute('encrypted');
}
set encrypted(value) {
this._encrypted = value;
}
resetEncrypted() {
this._encrypted = undefined;
}
// Temporarily expose input value. Use with caution.
get encryptedInput() {
return this._encrypted;
}
get iops() {
return this.getNumberAttribute('iops');
}
set iops(value) {
this._iops = value;
}
resetIops() {
this._iops = undefined;
}
// Temporarily expose input value. Use with caution.
get iopsInput() {
return this._iops;
}
get 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 snapshotId() {
return this.getStringAttribute('snapshot_id');
}
set snapshotId(value) {
this._snapshotId = value;
}
resetSnapshotId() {
this._snapshotId = undefined;
}
// Temporarily expose input value. Use with caution.
get snapshotIdInput() {
return this._snapshotId;
}
get throughput() {
return this.getNumberAttribute('throughput');
}
set throughput(value) {
this._throughput = value;
}
resetThroughput() {
this._throughput = undefined;
}
// Temporarily expose input value. Use with caution.
get throughputInput() {
return this._throughput;
}
get volumeSize() {
return this.getNumberAttribute('volume_size');
}
set volumeSize(value) {
this._volumeSize = value;
}
resetVolumeSize() {
this._volumeSize = undefined;
}
// Temporarily expose input value. Use with caution.
get volumeSizeInput() {
return this._volumeSize;
}
get volumeType() {
return this.getStringAttribute('volume_type');
}
set volumeType(value) {
this._volumeType = value;
}
resetVolumeType() {
this._volumeType = undefined;
}
// Temporarily expose input value. Use with caution.
get volumeTypeInput() {
return this._volumeType;
}
}
exports.LaunchConfigurationEbsBlockDeviceOutputReference = LaunchConfigurationEbsBlockDeviceOutputReference;
_a = JSII_RTTI_SYMBOL_1;
LaunchConfigurationEbsBlockDeviceOutputReference[_a] = { fqn: "@cdktf/provider-aws.launchConfiguration.LaunchConfigurationEbsBlockDeviceOutputReference", version: "21.22.1" };
class LaunchConfigurationEbsBlockDeviceList 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 LaunchConfigurationEbsBlockDeviceOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.LaunchConfigurationEbsBlockDeviceList = LaunchConfigurationEbsBlockDeviceList;
_b = JSII_RTTI_SYMBOL_1;
LaunchConfigurationEbsBlockDeviceList[_b] = { fqn: "@cdktf/provider-aws.launchConfiguration.LaunchConfigurationEbsBlockDeviceList", version: "21.22.1" };
function launchConfigurationEphemeralBlockDeviceToTerraform(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 launchConfigurationEphemeralBlockDeviceToHclTerraform(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 LaunchConfigurationEphemeralBlockDeviceOutputReference 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.LaunchConfigurationEphemeralBlockDeviceOutputReference = LaunchConfigurationEphemeralBlockDeviceOutputReference;
_c = JSII_RTTI_SYMBOL_1;
LaunchConfigurationEphemeralBlockDeviceOutputReference[_c] = { fqn: "@cdktf/provider-aws.launchConfiguration.LaunchConfigurationEphemeralBlockDeviceOutputReference", version: "21.22.1" };
class LaunchConfigurationEphemeralBlockDeviceList 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 LaunchConfigurationEphemeralBlockDeviceOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.LaunchConfigurationEphemeralBlockDeviceList = LaunchConfigurationEphemeralBlockDeviceList;
_d = JSII_RTTI_SYMBOL_1;
LaunchConfigurationEphemeralBlockDeviceList[_d] = { fqn: "@cdktf/provider-aws.launchConfiguration.LaunchConfigurationEphemeralBlockDeviceList", version: "21.22.1" };
function launchConfigurationMetadataOptionsToTerraform(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 {
http_endpoint: cdktf.stringToTerraform(struct.httpEndpoint),
http_put_response_hop_limit: cdktf.numberToTerraform(struct.httpPutResponseHopLimit),
http_tokens: cdktf.stringToTerraform(struct.httpTokens),
};
}
function launchConfigurationMetadataOptionsToHclTerraform(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 = {
http_endpoint: {
value: cdktf.stringToHclTerraform(struct.httpEndpoint),
isBlock: false,
type: "simple",
storageClassType: "string",
},
http_put_response_hop_limit: {
value: cdktf.numberToHclTerraform(struct.httpPutResponseHopLimit),
isBlock: false,
type: "simple",
storageClassType: "number",
},
http_tokens: {
value: cdktf.stringToHclTerraform(struct.httpTokens),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class LaunchConfigurationMetadataOptionsOutputReference 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._httpEndpoint !== undefined) {
hasAnyValues = true;
internalValueResult.httpEndpoint = this._httpEndpoint;
}
if (this._httpPutResponseHopLimit !== undefined) {
hasAnyValues = true;
internalValueResult.httpPutResponseHopLimit = this._httpPutResponseHopLimit;
}
if (this._httpTokens !== undefined) {
hasAnyValues = true;
internalValueResult.httpTokens = this._httpTokens;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._httpEndpoint = undefined;
this._httpPutResponseHopLimit = undefined;
this._httpTokens = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._httpEndpoint = value.httpEndpoint;
this._httpPutResponseHopLimit = value.httpPutResponseHopLimit;
this._httpTokens = value.httpTokens;
}
}
get httpEndpoint() {
return this.getStringAttribute('http_endpoint');
}
set httpEndpoint(value) {
this._httpEndpoint = value;
}
resetHttpEndpoint() {
this._httpEndpoint = undefined;
}
// Temporarily expose input value. Use with caution.
get httpEndpointInput() {
return this._httpEndpoint;
}
get httpPutResponseHopLimit() {
return this.getNumberAttribute('http_put_response_hop_limit');
}
set httpPutResponseHopLimit(value) {
this._httpPutResponseHopLimit = value;
}
resetHttpPutResponseHopLimit() {
this._httpPutResponseHopLimit = undefined;
}
// Temporarily expose input value. Use with caution.
get httpPutResponseHopLimitInput() {
return this._httpPutResponseHopLimit;
}
get httpTokens() {
return this.getStringAttribute('http_tokens');
}
set httpTokens(value) {
this._httpTokens = value;
}
resetHttpTokens() {
this._httpTokens = undefined;
}
// Temporarily expose input value. Use with caution.
get httpTokensInput() {
return this._httpTokens;
}
}
exports.LaunchConfigurationMetadataOptionsOutputReference = LaunchConfigurationMetadataOptionsOutputReference;
_e = JSII_RTTI_SYMBOL_1;
LaunchConfigurationMetadataOptionsOutputReference[_e] = { fqn: "@cdktf/provider-aws.launchConfiguration.LaunchConfigurationMetadataOptionsOutputReference", version: "21.22.1" };
function launchConfigurationRootBlockDeviceToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
delete_on_termination: cdktf.booleanToTerraform(struct.deleteOnTermination),
encrypted: cdktf.booleanToTerraform(struct.encrypted),
iops: cdktf.numberToTerraform(struct.iops),
throughput: cdktf.numberToTerraform(struct.throughput),
volume_size: cdktf.numberToTerraform(struct.volumeSize),
volume_type: cdktf.stringToTerraform(struct.volumeType),
};
}
function launchConfigurationRootBlockDeviceToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
delete_on_termination: {
value: cdktf.booleanToHclTerraform(struct.deleteOnTermination),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
encrypted: {
value: cdktf.booleanToHclTerraform(struct.encrypted),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
iops: {
value: cdktf.numberToHclTerraform(struct.iops),
isBlock: false,
type: "simple",
storageClassType: "number",
},
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 LaunchConfigurationRootBlockDeviceOutputReference 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._deleteOnTermination !== undefined) {
hasAnyValues = true;
internalValueResult.deleteOnTermination = this._deleteOnTermination;
}
if (this._encrypted !== undefined) {
hasAnyValues = true;
internalValueResult.encrypted = this._encrypted;
}
if (this._iops !== undefined) {
hasAnyValues = true;
internalValueResult.iops = this._iops;
}
if (this._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._deleteOnTermination = undefined;
this._encrypted = undefined;
this._iops = undefined;
this._throughput = undefined;
this._volumeSize = undefined;
this._volumeType = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._deleteOnTermination = value.deleteOnTermination;
this._encrypted = value.encrypted;
this._iops = value.iops;
this._throughput = value.throughput;
this._volumeSize = value.volumeSize;
this._volumeType = value.volumeType;
}
}
get deleteOnTermination() {
return this.getBooleanAttribute('delete_on_termination');
}
set deleteOnTermination(value) {
this._deleteOnTermination = value;
}
resetDeleteOnTermination() {
this._deleteOnTermination = undefined;
}
// Temporarily expose input value. Use with caution.
get deleteOnTerminationInput() {
return this._deleteOnTermination;
}
get encrypted() {
return this.getBooleanAttribute('encrypted');
}
set encrypted(value) {
this._encrypted = value;
}
resetEncrypted() {
this._encrypted = undefined;
}
// Temporarily expose input value. Use with caution.
get encryptedInput() {
return this._encrypted;
}
get iops() {
return this.getNumberAttribute('iops');
}
set iops(value) {
this._iops = value;
}
resetIops() {
this._iops = undefined;
}
// Temporarily expose input value. Use with caution.
get iopsInput() {
return this._iops;
}
get throughput() {
return this.getNumberAttribute('throughput');
}
set throughput(value) {
this._throughput = value;
}
resetThroughput() {
this._throughput = undefined;
}
// Temporarily expose input value. Use with caution.
get throughputInput() {
return this._throughput;
}
get volumeSize() {
return this.getNumberAttribute('volume_size');
}
set volumeSize(value) {
this._volumeSize = value;
}
resetVolumeSize() {
this._volumeSize = undefined;
}
// Temporarily expose input value. Use with caution.
get volumeSizeInput() {
return this._volumeSize;
}
get volumeType() {
return this.getStringAttribute('volume_type');
}
set volumeType(value) {
this._volumeType = value;
}
resetVolumeType() {
this._volumeType = undefined;
}
// Temporarily expose input value. Use with caution.
get volumeTypeInput() {
return this._volumeType;
}
}
exports.LaunchConfigurationRootBlockDeviceOutputReference = LaunchConfigurationRootBlockDeviceOutputReference;
_f = JSII_RTTI_SYMBOL_1;
LaunchConfigurationRootBlockDeviceOutputReference[_f] = { fqn: "@cdktf/provider-aws.launchConfiguration.LaunchConfigurationRootBlockDeviceOutputReference", version: "21.22.1" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/launch_configuration aws_launch_configuration}
*/
class LaunchConfiguration extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a LaunchConfiguration resource upon running "cdktf plan <stack-name>"
* @param scope The scope in which to define this construct
* @param importToId The construct id used in the generated config for the LaunchConfiguration to import
* @param importFromId The id of the existing LaunchConfiguration that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/launch_configuration#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the LaunchConfiguration to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_launch_configuration", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/launch_configuration aws_launch_configuration} Resource
*
* @param scope The scope in which to define this construct
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
* @param options LaunchConfigurationConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'aws_launch_configuration',
terraformGeneratorMetadata: {
providerName: 'aws',
providerVersion: '6.25.0',
providerVersionConstraint: '~> 6.0'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// ebs_block_device - computed: false, optional: true, required: false
this._ebsBlockDevice = new LaunchConfigurationEbsBlockDeviceList(this, "ebs_block_device", true);
// ephemeral_block_device - computed: false, optional: true, required: false
this._ephemeralBlockDevice = new LaunchConfigurationEphemeralBlockDeviceList(this, "ephemeral_block_device", true);
// metadata_options - computed: false, optional: true, required: false
this._metadataOptions = new LaunchConfigurationMetadataOptionsOutputReference(this, "metadata_options");
// root_block_device - computed: false, optional: true, required: false
this._rootBlockDevice = new LaunchConfigurationRootBlockDeviceOutputReference(this, "root_block_device");
this._associatePublicIpAddress = config.associatePublicIpAddress;
this._ebsOptimized = config.ebsOptimized;
this._enableMonitoring = config.enableMonitoring;
this._iamInstanceProfile = config.iamInstanceProfile;
this._id = config.id;
this._imageId = config.imageId;
this._instanceType = config.instanceType;
this._keyName = config.keyName;
this._name = config.name;
this._namePrefix = config.namePrefix;
this._placementTenancy = config.placementTenancy;
this._region = config.region;
this._securityGroups = config.securityGroups;
this._spotPrice = config.spotPrice;
this._userData = config.userData;
this._userDataBase64 = config.userDataBase64;
this._ebsBlockDevice.internalValue = config.ebsBlockDevice;
this._ephemeralBlockDevice.internalValue = config.ephemeralBlockDevice;
this._metadataOptions.internalValue = config.metadataOptions;
this._rootBlockDevice.internalValue = config.rootBlockDevice;
}
// ==========
// ATTRIBUTES
// ==========
// arn - computed: true, optional: false, required: false
get arn() {
return this.getStringAttribute('arn');
}
get associatePublicIpAddress() {
return this.getBooleanAttribute('associate_public_ip_address');
}
set associatePublicIpAddress(value) {
this._associatePublicIpAddress = value;
}
resetAssociatePublicIpAddress() {
this._associatePublicIpAddress = undefined;
}
// Temporarily expose input value. Use with caution.
get associatePublicIpAddressInput() {
return this._associatePublicIpAddress;
}
get ebsOptimized() {
return this.getBooleanAttribute('ebs_optimized');
}
set ebsOptimized(value) {
this._ebsOptimized = value;
}
resetEbsOptimized() {
this._ebsOptimized = undefined;
}
// Temporarily expose input value. Use with caution.
get ebsOptimizedInput() {
return this._ebsOptimized;
}
get enableMonitoring() {
return this.getBooleanAttribute('enable_monitoring');
}
set enableMonitoring(value) {
this._enableMonitoring = value;
}
resetEnableMonitoring() {
this._enableMonitoring = undefined;
}
// Temporarily expose input value. Use with caution.
get enableMonitoringInput() {
return this._enableMonitoring;
}
get iamInstanceProfile() {
return this.getStringAttribute('iam_instance_profile');
}
set iamInstanceProfile(value) {
this._iamInstanceProfile = value;
}
resetIamInstanceProfile() {
this._iamInstanceProfile = undefined;
}
// Temporarily expose input value. Use with caution.
get iamInstanceProfileInput() {
return this._iamInstanceProfile;
}
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 imageId() {
return this.getStringAttribute('image_id');
}
set imageId(value) {
this._imageId = value;
}
// Temporarily expose input value. Use with caution.
get imageIdInput() {
return this._imageId;
}
get instanceType() {
return this.getStringAttribute('instance_type');
}
set instanceType(value) {
this._instanceType = value;
}
// Temporarily expose input value. Use with caution.
get instanceTypeInput() {
return this._instanceType;
}
get keyName() {
return this.getStringAttribute('key_name');
}
set keyName(value) {
this._keyName = value;
}
resetKeyName() {
this._keyName = undefined;
}
// Temporarily expose input value. Use with caution.
get keyNameInput() {
return this._keyName;
}
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 namePrefix() {
return this.getStringAttribute('name_prefix');
}
set namePrefix(value) {
this._namePrefix = value;
}
resetNamePrefix() {
this._namePrefix = undefined;
}
// Temporarily expose input value. Use with caution.
get namePrefixInput() {
return this._namePrefix;
}
get placementTenancy() {
return this.getStringAttribute('placement_tenancy');
}
set placementTenancy(value) {
this._placementTenancy = value;
}
resetPlacementTenancy() {
this._placementTenancy = undefined;
}
// Temporarily expose input value. Use with caution.
get placementTenancyInput() {
return this._placementTenancy;
}
get region() {
return this.getStringAttribute('region');
}
set region(value) {
this._region = value;
}
resetRegion() {
this._region = undefined;
}
// Temporarily expose input value. Use with caution.
get regionInput() {
return this._region;
}
get securityGroups() {
return cdktf.Fn.tolist(this.getListAttribute('security_groups'));
}
set securityGroups(value) {
this._securityGroups = value;
}
resetSecurityGroups() {
this._securityGroups = undefined;
}
// Temporarily expose input value. Use with caution.
get securityGroupsInput() {
return this._securityGroups;
}
get spotPrice() {
return this.getStringAttribute('spot_price');
}
set spotPrice(value) {
this._spotPrice = value;
}
resetSpotPrice() {
this._spotPrice = undefined;
}
// Temporarily expose input value. Use with caution.
get spotPriceInput() {
return this._spotPrice;
}
get userData() {
return this.getStringAttribute('user_data');
}
set userData(value) {
this._userData = value;
}
resetUserData() {
this._userData = undefined;
}
// Temporarily expose input value. Use with caution.
get userDataInput() {
return this._userData;
}
get userDataBase64() {
return this.getStringAttribute('user_data_base64');
}
set userDataBase64(value) {
this._userDataBase64 = value;
}
resetUserDataBase64() {
this._userDataBase64 = undefined;
}
// Temporarily expose input value. Use with caution.
get userDataBase64Input() {
return this._userDataBase64;
}
get ebsBlockDevice() {
return this._ebsBlockDevice;
}
putEbsBlockDevice(value) {
this._ebsBlockDevice.internalValue = value;
}
resetEbsBlockDevice() {
this._ebsBlockDevice.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get ebsBlockDeviceInput() {
return this._ebsBlockDevice.internalValue;
}
get ephemeralBlockDevice() {
return this._ephemeralBlockDevice;
}
putEphemeralBlockDevice(value) {
this._ephemeralBlockDevice.internalValue = value;
}
resetEphemeralBlockDevice() {
this._ephemeralBlockDevice.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get ephemeralBlockDeviceInput() {
return this._ephemeralBlockDevice.internalValue;
}
get metadataOptions() {
return this._metadataOptions;
}
putMetadataOptions(value) {
this._metadataOptions.internalValue = value;
}
resetMetadataOptions() {
this._metadataOptions.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get metadataOptionsInput() {
return this._metadataOptions.internalValue;
}
get rootBlockDevice() {
return this._rootBlockDevice;
}
putRootBlockDevice(value) {
this._rootBlockDevice.internalValue = value;
}
resetRootBlockDevice() {
this._rootBlockDevice.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get rootBlockDeviceInput() {
return this._rootBlockDevice.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
associate_public_ip_address: cdktf.booleanToTerraform(this._associatePublicIpAddress),
ebs_optimized: cdktf.booleanToTerraform(this._ebsOptimized),
enable_monitoring: cdktf.booleanToTerraform(this._enableMonitoring),
iam_instance_profile: cdktf.stringToTerraform(this._iamInstanceProfile),
id: cdktf.stringToTerraform(this._id),
image_id: cdktf.stringToTerraform(this._imageId),
instance_type: cdktf.stringToTerraform(this._instanceType),
key_name: cdktf.stringToTerraform(this._keyName),
name: cdktf.stringToTerraform(this._name),
name_prefix: cdktf.stringToTerraform(this._namePrefix),
placement_tenancy: cdktf.stringToTerraform(this._placementTenancy),
region: cdktf.stringToTerraform(this._region),
security_groups: cdktf.listMapper(cdktf.stringToTerraform, false)(this._securityGroups),
spot_price: cdktf.stringToTerraform(this._spotPrice),
user_data: cdktf.stringToTerraform(this._userData),
user_data_base64: cdktf.stringToTerraform(this._userDataBase64),
ebs_block_device: cdktf.listMapper(launchConfigurationEbsBlockDeviceToTerraform, true)(this._ebsBlockDevice.internalValue),
ephemeral_block_device: cdktf.listMapper(launchConfigurationEphemeralBlockDeviceToTerraform, true)(this._ephemeralBlockDevice.internalValue),
metadata_options: launchConfigurationMetadataOptionsToTerraform(this._metadataOptions.internalValue),
root_block_device: launchConfigurationRootBlockDeviceToTerraform(this._rootBlockDevice.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
associate_public_ip_address: {
value: cdktf.booleanToHclTerraform(this._associatePublicIpAddress),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
ebs_optimized: {
value: cdktf.booleanToHclTerraform(this._ebsOptimized),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enable_monitoring: {
value: cdktf.booleanToHclTerraform(this._enableMonitoring),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
iam_instance_profile: {
value: cdktf.stringToHclTerraform(this._iamInstanceProfile),
isBlock: false,
type: "simple",
storageClassType: "string",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
image_id: {
value: cdktf.stringToHclTerraform(this._imageId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
instance_type: {
value: cdktf.stringToHclTerraform(this._instanceType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
key_name: {
value: cdktf.stringToHclTerraform(this._keyName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(this._name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name_prefix: {
value: cdktf.stringToHclTerraform(this._namePrefix),
isBlock: false,
type: "simple",
storageClassType: "string",
},
placement_tenancy: {
value: cdktf.stringToHclTerraform(this._placementTenancy),
isBlock: false,
type: "simple",
storageClassType: "string",
},
region: {
value: cdktf.stringToHclTerraform(this._region),
isBlock: false,
type: "simple",
storageClassType: "string",
},
security_groups: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._securityGroups),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
spot_price: {
value: cdktf.stringToHclTerraform(this._spotPrice),
isBlock: false,
type: "simple",
storageClassType: "string",
},
user_data: {
value: cdktf.stringToHclTerraform(this._userData),
isBlock: false,
type: "simple",
storageClassType: "string",
},
user_data_base64: {
value: cdktf.stringToHclTerraform(this._userDataBase64),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ebs_block_device: {
value: cdktf.listMapperHcl(launchConfigurationEbsBlockDeviceToHclTerraform, true)(this._ebsBlockDevice.internalValue),
isBlock: true,
type: "set",
storageClassType: "LaunchConfigurationEbsBlockDeviceList",
},
ephemeral_block_device: {
value: cdktf.listMapperHcl(launchConfigurationEphemeralBlockDeviceToHclTerraform, true)(this._ephemeralBlockDevice.internalValue),
isBlock: true,
type: "set",
storageClassType: "LaunchConfigurationEphemeralBlockDeviceList",
},
metadata_options: {
value: launchConfigurationMetadataOptionsToHclTerraform(this._metadataOptions.internalValue),
isBlock: true,
type: "list",
storageClassType: "LaunchConfigurationMetadataOptionsList",
},
root_block_device: {
value: launchConfigurationRootBlockDeviceToHclTerraform(this._rootBlockDevice.internalValue),
isBlock: true,
type: "list",
storageClassType: "LaunchConfigurationRootBlockDeviceList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
}
exports.LaunchConfiguration = LaunchConfiguration;
_g = JSII_RTTI_SYMBOL_1;
LaunchConfiguration[_g] = { fqn: "@cdktf/provider-aws.launchConfiguration.LaunchConfiguration", version: "21.22.1" };
// =================
// STATIC PROPERTIES
// =================
LaunchConfiguration.tfResourceType = "aws_launch_configuration";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI