@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,223 lines • 191 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImagebuilderContainerRecipe = exports.ImagebuilderContainerRecipeTargetRepositoryOutputReference = exports.ImagebuilderContainerRecipeInstanceConfigurationOutputReference = exports.ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingList = exports.ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingOutputReference = exports.ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingEbsOutputReference = exports.ImagebuilderContainerRecipeComponentList = exports.ImagebuilderContainerRecipeComponentOutputReference = exports.ImagebuilderContainerRecipeComponentParameterList = exports.ImagebuilderContainerRecipeComponentParameterOutputReference = void 0;
exports.imagebuilderContainerRecipeComponentParameterToTerraform = imagebuilderContainerRecipeComponentParameterToTerraform;
exports.imagebuilderContainerRecipeComponentParameterToHclTerraform = imagebuilderContainerRecipeComponentParameterToHclTerraform;
exports.imagebuilderContainerRecipeComponentToTerraform = imagebuilderContainerRecipeComponentToTerraform;
exports.imagebuilderContainerRecipeComponentToHclTerraform = imagebuilderContainerRecipeComponentToHclTerraform;
exports.imagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingEbsToTerraform = imagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingEbsToTerraform;
exports.imagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingEbsToHclTerraform = imagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingEbsToHclTerraform;
exports.imagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingToTerraform = imagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingToTerraform;
exports.imagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingToHclTerraform = imagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingToHclTerraform;
exports.imagebuilderContainerRecipeInstanceConfigurationToTerraform = imagebuilderContainerRecipeInstanceConfigurationToTerraform;
exports.imagebuilderContainerRecipeInstanceConfigurationToHclTerraform = imagebuilderContainerRecipeInstanceConfigurationToHclTerraform;
exports.imagebuilderContainerRecipeTargetRepositoryToTerraform = imagebuilderContainerRecipeTargetRepositoryToTerraform;
exports.imagebuilderContainerRecipeTargetRepositoryToHclTerraform = imagebuilderContainerRecipeTargetRepositoryToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function imagebuilderContainerRecipeComponentParameterToTerraform(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 {
name: cdktf.stringToTerraform(struct.name),
value: cdktf.stringToTerraform(struct.value),
};
}
function imagebuilderContainerRecipeComponentParameterToHclTerraform(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 = {
name: {
value: cdktf.stringToHclTerraform(struct.name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
value: {
value: cdktf.stringToHclTerraform(struct.value),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ImagebuilderContainerRecipeComponentParameterOutputReference 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._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
if (this._value !== undefined) {
hasAnyValues = true;
internalValueResult.value = this._value;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._name = undefined;
this._value = 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._name = value.name;
this._value = value.value;
}
}
get name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
get value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.ImagebuilderContainerRecipeComponentParameterOutputReference = ImagebuilderContainerRecipeComponentParameterOutputReference;
_a = JSII_RTTI_SYMBOL_1;
ImagebuilderContainerRecipeComponentParameterOutputReference[_a] = { fqn: "@cdktf/provider-aws.imagebuilderContainerRecipe.ImagebuilderContainerRecipeComponentParameterOutputReference", version: "21.22.1" };
class ImagebuilderContainerRecipeComponentParameterList 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 ImagebuilderContainerRecipeComponentParameterOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ImagebuilderContainerRecipeComponentParameterList = ImagebuilderContainerRecipeComponentParameterList;
_b = JSII_RTTI_SYMBOL_1;
ImagebuilderContainerRecipeComponentParameterList[_b] = { fqn: "@cdktf/provider-aws.imagebuilderContainerRecipe.ImagebuilderContainerRecipeComponentParameterList", version: "21.22.1" };
function imagebuilderContainerRecipeComponentToTerraform(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 {
component_arn: cdktf.stringToTerraform(struct.componentArn),
parameter: cdktf.listMapper(imagebuilderContainerRecipeComponentParameterToTerraform, true)(struct.parameter),
};
}
function imagebuilderContainerRecipeComponentToHclTerraform(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 = {
component_arn: {
value: cdktf.stringToHclTerraform(struct.componentArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
parameter: {
value: cdktf.listMapperHcl(imagebuilderContainerRecipeComponentParameterToHclTerraform, true)(struct.parameter),
isBlock: true,
type: "set",
storageClassType: "ImagebuilderContainerRecipeComponentParameterList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ImagebuilderContainerRecipeComponentOutputReference 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;
// parameter - computed: false, optional: true, required: false
this._parameter = new ImagebuilderContainerRecipeComponentParameterList(this, "parameter", true);
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._componentArn !== undefined) {
hasAnyValues = true;
internalValueResult.componentArn = this._componentArn;
}
if (this._parameter?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.parameter = this._parameter?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._componentArn = undefined;
this._parameter.internalValue = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._componentArn = value.componentArn;
this._parameter.internalValue = value.parameter;
}
}
get componentArn() {
return this.getStringAttribute('component_arn');
}
set componentArn(value) {
this._componentArn = value;
}
// Temporarily expose input value. Use with caution.
get componentArnInput() {
return this._componentArn;
}
get parameter() {
return this._parameter;
}
putParameter(value) {
this._parameter.internalValue = value;
}
resetParameter() {
this._parameter.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get parameterInput() {
return this._parameter.internalValue;
}
}
exports.ImagebuilderContainerRecipeComponentOutputReference = ImagebuilderContainerRecipeComponentOutputReference;
_c = JSII_RTTI_SYMBOL_1;
ImagebuilderContainerRecipeComponentOutputReference[_c] = { fqn: "@cdktf/provider-aws.imagebuilderContainerRecipe.ImagebuilderContainerRecipeComponentOutputReference", version: "21.22.1" };
class ImagebuilderContainerRecipeComponentList 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 ImagebuilderContainerRecipeComponentOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ImagebuilderContainerRecipeComponentList = ImagebuilderContainerRecipeComponentList;
_d = JSII_RTTI_SYMBOL_1;
ImagebuilderContainerRecipeComponentList[_d] = { fqn: "@cdktf/provider-aws.imagebuilderContainerRecipe.ImagebuilderContainerRecipeComponentList", version: "21.22.1" };
function imagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingEbsToTerraform(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.stringToTerraform(struct.deleteOnTermination),
encrypted: cdktf.stringToTerraform(struct.encrypted),
iops: cdktf.numberToTerraform(struct.iops),
kms_key_id: cdktf.stringToTerraform(struct.kmsKeyId),
snapshot_id: cdktf.stringToTerraform(struct.snapshotId),
throughput: cdktf.numberToTerraform(struct.throughput),
volume_size: cdktf.numberToTerraform(struct.volumeSize),
volume_type: cdktf.stringToTerraform(struct.volumeType),
};
}
function imagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingEbsToHclTerraform(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.stringToHclTerraform(struct.deleteOnTermination),
isBlock: false,
type: "simple",
storageClassType: "string",
},
encrypted: {
value: cdktf.stringToHclTerraform(struct.encrypted),
isBlock: false,
type: "simple",
storageClassType: "string",
},
iops: {
value: cdktf.numberToHclTerraform(struct.iops),
isBlock: false,
type: "simple",
storageClassType: "number",
},
kms_key_id: {
value: cdktf.stringToHclTerraform(struct.kmsKeyId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
snapshot_id: {
value: cdktf.stringToHclTerraform(struct.snapshotId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
throughput: {
value: cdktf.numberToHclTerraform(struct.throughput),
isBlock: false,
type: "simple",
storageClassType: "number",
},
volume_size: {
value: cdktf.numberToHclTerraform(struct.volumeSize),
isBlock: false,
type: "simple",
storageClassType: "number",
},
volume_type: {
value: cdktf.stringToHclTerraform(struct.volumeType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingEbsOutputReference 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._kmsKeyId !== undefined) {
hasAnyValues = true;
internalValueResult.kmsKeyId = this._kmsKeyId;
}
if (this._snapshotId !== undefined) {
hasAnyValues = true;
internalValueResult.snapshotId = this._snapshotId;
}
if (this._throughput !== undefined) {
hasAnyValues = true;
internalValueResult.throughput = this._throughput;
}
if (this._volumeSize !== undefined) {
hasAnyValues = true;
internalValueResult.volumeSize = this._volumeSize;
}
if (this._volumeType !== undefined) {
hasAnyValues = true;
internalValueResult.volumeType = this._volumeType;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._deleteOnTermination = undefined;
this._encrypted = undefined;
this._iops = undefined;
this._kmsKeyId = undefined;
this._snapshotId = 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._kmsKeyId = value.kmsKeyId;
this._snapshotId = value.snapshotId;
this._throughput = value.throughput;
this._volumeSize = value.volumeSize;
this._volumeType = value.volumeType;
}
}
get deleteOnTermination() {
return this.getStringAttribute('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.getStringAttribute('encrypted');
}
set encrypted(value) {
this._encrypted = value;
}
resetEncrypted() {
this._encrypted = undefined;
}
// Temporarily expose input value. Use with caution.
get encryptedInput() {
return this._encrypted;
}
get iops() {
return this.getNumberAttribute('iops');
}
set iops(value) {
this._iops = value;
}
resetIops() {
this._iops = undefined;
}
// Temporarily expose input value. Use with caution.
get iopsInput() {
return this._iops;
}
get kmsKeyId() {
return this.getStringAttribute('kms_key_id');
}
set kmsKeyId(value) {
this._kmsKeyId = value;
}
resetKmsKeyId() {
this._kmsKeyId = undefined;
}
// Temporarily expose input value. Use with caution.
get kmsKeyIdInput() {
return this._kmsKeyId;
}
get snapshotId() {
return this.getStringAttribute('snapshot_id');
}
set snapshotId(value) {
this._snapshotId = value;
}
resetSnapshotId() {
this._snapshotId = undefined;
}
// Temporarily expose input value. Use with caution.
get snapshotIdInput() {
return this._snapshotId;
}
get throughput() {
return this.getNumberAttribute('throughput');
}
set throughput(value) {
this._throughput = value;
}
resetThroughput() {
this._throughput = undefined;
}
// Temporarily expose input value. Use with caution.
get throughputInput() {
return this._throughput;
}
get volumeSize() {
return this.getNumberAttribute('volume_size');
}
set volumeSize(value) {
this._volumeSize = value;
}
resetVolumeSize() {
this._volumeSize = undefined;
}
// Temporarily expose input value. Use with caution.
get volumeSizeInput() {
return this._volumeSize;
}
get volumeType() {
return this.getStringAttribute('volume_type');
}
set volumeType(value) {
this._volumeType = value;
}
resetVolumeType() {
this._volumeType = undefined;
}
// Temporarily expose input value. Use with caution.
get volumeTypeInput() {
return this._volumeType;
}
}
exports.ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingEbsOutputReference = ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingEbsOutputReference;
_e = JSII_RTTI_SYMBOL_1;
ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingEbsOutputReference[_e] = { fqn: "@cdktf/provider-aws.imagebuilderContainerRecipe.ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingEbsOutputReference", version: "21.22.1" };
function imagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingToTerraform(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),
ebs: imagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingEbsToTerraform(struct.ebs),
};
}
function imagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingToHclTerraform(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",
},
ebs: {
value: imagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingEbsToHclTerraform(struct.ebs),
isBlock: true,
type: "list",
storageClassType: "ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingEbsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
this.isEmptyObject = false;
// ebs - computed: false, optional: true, required: false
this._ebs = new ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingEbsOutputReference(this, "ebs");
}
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;
}
if (this._ebs?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.ebs = this._ebs?.internalValue;
}
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;
this._ebs.internalValue = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._deviceName = value.deviceName;
this._noDevice = value.noDevice;
this._virtualName = value.virtualName;
this._ebs.internalValue = value.ebs;
}
}
get deviceName() {
return this.getStringAttribute('device_name');
}
set deviceName(value) {
this._deviceName = value;
}
resetDeviceName() {
this._deviceName = undefined;
}
// 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;
}
get ebs() {
return this._ebs;
}
putEbs(value) {
this._ebs.internalValue = value;
}
resetEbs() {
this._ebs.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get ebsInput() {
return this._ebs.internalValue;
}
}
exports.ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingOutputReference = ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingOutputReference;
_f = JSII_RTTI_SYMBOL_1;
ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingOutputReference[_f] = { fqn: "@cdktf/provider-aws.imagebuilderContainerRecipe.ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingOutputReference", version: "21.22.1" };
class ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingList 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 ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingList = ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingList;
_g = JSII_RTTI_SYMBOL_1;
ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingList[_g] = { fqn: "@cdktf/provider-aws.imagebuilderContainerRecipe.ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingList", version: "21.22.1" };
function imagebuilderContainerRecipeInstanceConfigurationToTerraform(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 {
image: cdktf.stringToTerraform(struct.image),
block_device_mapping: cdktf.listMapper(imagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingToTerraform, true)(struct.blockDeviceMapping),
};
}
function imagebuilderContainerRecipeInstanceConfigurationToHclTerraform(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 = {
image: {
value: cdktf.stringToHclTerraform(struct.image),
isBlock: false,
type: "simple",
storageClassType: "string",
},
block_device_mapping: {
value: cdktf.listMapperHcl(imagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingToHclTerraform, true)(struct.blockDeviceMapping),
isBlock: true,
type: "set",
storageClassType: "ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ImagebuilderContainerRecipeInstanceConfigurationOutputReference 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;
// block_device_mapping - computed: false, optional: true, required: false
this._blockDeviceMapping = new ImagebuilderContainerRecipeInstanceConfigurationBlockDeviceMappingList(this, "block_device_mapping", true);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._image !== undefined) {
hasAnyValues = true;
internalValueResult.image = this._image;
}
if (this._blockDeviceMapping?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.blockDeviceMapping = this._blockDeviceMapping?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._image = undefined;
this._blockDeviceMapping.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._image = value.image;
this._blockDeviceMapping.internalValue = value.blockDeviceMapping;
}
}
get image() {
return this.getStringAttribute('image');
}
set image(value) {
this._image = value;
}
resetImage() {
this._image = undefined;
}
// Temporarily expose input value. Use with caution.
get imageInput() {
return this._image;
}
get blockDeviceMapping() {
return this._blockDeviceMapping;
}
putBlockDeviceMapping(value) {
this._blockDeviceMapping.internalValue = value;
}
resetBlockDeviceMapping() {
this._blockDeviceMapping.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get blockDeviceMappingInput() {
return this._blockDeviceMapping.internalValue;
}
}
exports.ImagebuilderContainerRecipeInstanceConfigurationOutputReference = ImagebuilderContainerRecipeInstanceConfigurationOutputReference;
_h = JSII_RTTI_SYMBOL_1;
ImagebuilderContainerRecipeInstanceConfigurationOutputReference[_h] = { fqn: "@cdktf/provider-aws.imagebuilderContainerRecipe.ImagebuilderContainerRecipeInstanceConfigurationOutputReference", version: "21.22.1" };
function imagebuilderContainerRecipeTargetRepositoryToTerraform(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 {
repository_name: cdktf.stringToTerraform(struct.repositoryName),
service: cdktf.stringToTerraform(struct.service),
};
}
function imagebuilderContainerRecipeTargetRepositoryToHclTerraform(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 = {
repository_name: {
value: cdktf.stringToHclTerraform(struct.repositoryName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
service: {
value: cdktf.stringToHclTerraform(struct.service),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ImagebuilderContainerRecipeTargetRepositoryOutputReference 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._repositoryName !== undefined) {
hasAnyValues = true;
internalValueResult.repositoryName = this._repositoryName;
}
if (this._service !== undefined) {
hasAnyValues = true;
internalValueResult.service = this._service;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._repositoryName = undefined;
this._service = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._repositoryName = value.repositoryName;
this._service = value.service;
}
}
get repositoryName() {
return this.getStringAttribute('repository_name');
}
set repositoryName(value) {
this._repositoryName = value;
}
// Temporarily expose input value. Use with caution.
get repositoryNameInput() {
return this._repositoryName;
}
get service() {
return this.getStringAttribute('service');
}
set service(value) {
this._service = value;
}
// Temporarily expose input value. Use with caution.
get serviceInput() {
return this._service;
}
}
exports.ImagebuilderContainerRecipeTargetRepositoryOutputReference = ImagebuilderContainerRecipeTargetRepositoryOutputReference;
_j = JSII_RTTI_SYMBOL_1;
ImagebuilderContainerRecipeTargetRepositoryOutputReference[_j] = { fqn: "@cdktf/provider-aws.imagebuilderContainerRecipe.ImagebuilderContainerRecipeTargetRepositoryOutputReference", version: "21.22.1" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/imagebuilder_container_recipe aws_imagebuilder_container_recipe}
*/
class ImagebuilderContainerRecipe extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a ImagebuilderContainerRecipe 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 ImagebuilderContainerRecipe to import
* @param importFromId The id of the existing ImagebuilderContainerRecipe that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/imagebuilder_container_recipe#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the ImagebuilderContainerRecipe to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_imagebuilder_container_recipe", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/imagebuilder_container_recipe aws_imagebuilder_container_recipe} 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 ImagebuilderContainerRecipeConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'aws_imagebuilder_container_recipe',
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
});
// component - computed: false, optional: false, required: true
this._component = new ImagebuilderContainerRecipeComponentList(this, "component", false);
// instance_configuration - computed: false, optional: true, required: false
this._instanceConfiguration = new ImagebuilderContainerRecipeInstanceConfigurationOutputReference(this, "instance_configuration");
// target_repository - computed: false, optional: false, required: true
this._targetRepository = new ImagebuilderContainerRecipeTargetRepositoryOutputReference(this, "target_repository");
this._containerType = config.containerType;
this._description = config.description;
this._dockerfileTemplateData = config.dockerfileTemplateData;
this._dockerfileTemplateUri = config.dockerfileTemplateUri;
this._id = config.id;
this._kmsKeyId = config.kmsKeyId;
this._name = config.name;
this._parentImage = config.parentImage;
this._platformOverride = config.platformOverride;
this._region = config.region;
this._tags = config.tags;
this._tagsAll = config.tagsAll;
this._version = config.version;
this._workingDirectory = config.workingDirectory;
this._component.internalValue = config.component;
this._instanceConfiguration.internalValue = config.instanceConfiguration;
this._targetRepository.internalValue = config.targetRepository;
}
// ==========
// ATTRIBUTES
// ==========
// arn - computed: true, optional: false, required: false
get arn() {
return this.getStringAttribute('arn');
}
get containerType() {
return this.getStringAttribute('container_type');
}
set containerType(value) {
this._containerType = value;
}
// Temporarily expose input value. Use with caution.
get containerTypeInput() {
return this._containerType;
}
// date_created - computed: true, optional: false, required: false
get dateCreated() {
return this.getStringAttribute('date_created');
}
get description() {
return this.getStringAttribute('description');
}
set description(value) {
this._description = value;
}
resetDescription() {
this._description = undefined;
}
// Temporarily expose input value. Use with caution.
get descriptionInput() {
return this._description;
}
get dockerfileTemplateData() {
return this.getStringAttribute('dockerfile_template_data');
}
set dockerfileTemplateData(value) {
this._dockerfileTemplateData = value;
}
resetDockerfileTemplateData() {
this._dockerfileTemplateData = undefined;
}
// Temporarily expose input value. Use with caution.
get dockerfileTemplateDataInput() {
return this._dockerfileTemplateData;
}
get dockerfileTemplateUri() {
return this.getStringAttribute('dockerfile_template_uri');
}
set dockerfileTemplateUri(value) {
this._dockerfileTemplateUri = value;
}
resetDockerfileTemplateUri() {
this._dockerfileTemplateUri = undefined;
}
// Temporarily expose input value. Use with caution.
get dockerfileTemplateUriInput() {
return this._dockerfileTemplateUri;
}
// encrypted - computed: true, optional: false, required: false
get encrypted() {
return this.getBooleanAttribute('encrypted');
}
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 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 name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
// owner - computed: true, optional: false, required: false
get owner() {
return this.getStringAttribute('owner');
}
get parentImage() {
return this.getStringAttribute('parent_image');
}
set parentImage(value) {
this._parentImage = value;
}
// Temporarily expose input value. Use with caution.
get parentImageInput() {
return this._parentImage;
}
// platform - computed: true, optional: false, required: false
get platform() {
return this.getStringAttribute('platform');
}
get platformOverride() {
return this.getStringAttribute('platform_override');
}
set platformOverride(value) {
this._platformOverride = value;
}
resetPlatformOverride() {
this._platformOverride = undefined;
}
// Temporarily expose input value. Use with caution.
get platformOverrideInput() {
return this._platformOverride;
}
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 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 version() {
return this.getStringAttribute('version');
}
set version(value) {
this._version = value;
}
// Temporarily expose input value. Use with caution.
get versionInput() {
return this._version;
}
get workingDirectory() {
return this.getStringAttribute('working_directory');
}
set workingDirectory(value) {
this._workingDirectory = value;
}
resetWorkingDirectory() {
this._workingDirectory = undefined;
}
// Temporarily expose input value. Use with caution.
get workingDirectoryInput() {
return this._workingDirectory;
}
get component() {
return this._component;
}
putComponent(value) {
this._component.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get componentInput() {
return this._component.internalValue;
}
get instanceConfiguration() {
return this._instanceConfiguration;
}
putInstanceConfiguration(value) {
this._instanceConfiguration.internalValue = value;
}
resetInstanceConfiguration() {
this._instanceConfiguration.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get instanceConfigurationInput() {
return this._instanceConfiguration.internalValue;
}
get targetRepository() {
return this._targetRepository;
}
putTargetRepository(value) {
this._targetRepository.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get targetRepositoryInput() {
return this._targetRepository.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
container_type: cdktf.stringToTerraform(this._containerType),
description: cdktf.stringToTerraform(this._description),
dockerfile_template_data: cdktf.stringToTerraform(this._dockerfileTemplateData),
dockerfile_template_uri: cdktf.stringToTerraform(this._dockerfileTemplateUri),
id: cdktf.stringToTerraform(this._id),
kms_key_id: cdktf.stringToTerraform(this._kmsKeyId),
name: cdktf.stringToTerraform(this._name),
parent_image: cdktf.stringToTerraform(this._parentImage),
platform_overri