@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,127 lines (1,126 loc) • 193 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImagebuilderImage = exports.ImagebuilderImageWorkflowList = exports.ImagebuilderImageWorkflowOutputReference = exports.ImagebuilderImageWorkflowParameterList = exports.ImagebuilderImageWorkflowParameterOutputReference = exports.ImagebuilderImageTimeoutsOutputReference = exports.ImagebuilderImageImageTestsConfigurationOutputReference = exports.ImagebuilderImageImageScanningConfigurationOutputReference = exports.ImagebuilderImageImageScanningConfigurationEcrConfigurationOutputReference = exports.ImagebuilderImageOutputResourcesList = exports.ImagebuilderImageOutputResourcesOutputReference = exports.ImagebuilderImageOutputResourcesContainersList = exports.ImagebuilderImageOutputResourcesContainersOutputReference = exports.ImagebuilderImageOutputResourcesAmisList = exports.ImagebuilderImageOutputResourcesAmisOutputReference = void 0;
exports.imagebuilderImageOutputResourcesAmisToTerraform = imagebuilderImageOutputResourcesAmisToTerraform;
exports.imagebuilderImageOutputResourcesAmisToHclTerraform = imagebuilderImageOutputResourcesAmisToHclTerraform;
exports.imagebuilderImageOutputResourcesContainersToTerraform = imagebuilderImageOutputResourcesContainersToTerraform;
exports.imagebuilderImageOutputResourcesContainersToHclTerraform = imagebuilderImageOutputResourcesContainersToHclTerraform;
exports.imagebuilderImageOutputResourcesToTerraform = imagebuilderImageOutputResourcesToTerraform;
exports.imagebuilderImageOutputResourcesToHclTerraform = imagebuilderImageOutputResourcesToHclTerraform;
exports.imagebuilderImageImageScanningConfigurationEcrConfigurationToTerraform = imagebuilderImageImageScanningConfigurationEcrConfigurationToTerraform;
exports.imagebuilderImageImageScanningConfigurationEcrConfigurationToHclTerraform = imagebuilderImageImageScanningConfigurationEcrConfigurationToHclTerraform;
exports.imagebuilderImageImageScanningConfigurationToTerraform = imagebuilderImageImageScanningConfigurationToTerraform;
exports.imagebuilderImageImageScanningConfigurationToHclTerraform = imagebuilderImageImageScanningConfigurationToHclTerraform;
exports.imagebuilderImageImageTestsConfigurationToTerraform = imagebuilderImageImageTestsConfigurationToTerraform;
exports.imagebuilderImageImageTestsConfigurationToHclTerraform = imagebuilderImageImageTestsConfigurationToHclTerraform;
exports.imagebuilderImageTimeoutsToTerraform = imagebuilderImageTimeoutsToTerraform;
exports.imagebuilderImageTimeoutsToHclTerraform = imagebuilderImageTimeoutsToHclTerraform;
exports.imagebuilderImageWorkflowParameterToTerraform = imagebuilderImageWorkflowParameterToTerraform;
exports.imagebuilderImageWorkflowParameterToHclTerraform = imagebuilderImageWorkflowParameterToHclTerraform;
exports.imagebuilderImageWorkflowToTerraform = imagebuilderImageWorkflowToTerraform;
exports.imagebuilderImageWorkflowToHclTerraform = imagebuilderImageWorkflowToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function imagebuilderImageOutputResourcesAmisToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {};
}
function imagebuilderImageOutputResourcesAmisToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {};
return attrs;
}
class ImagebuilderImageOutputResourcesAmisOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
}
}
// account_id - computed: true, optional: false, required: false
get accountId() {
return this.getStringAttribute('account_id');
}
// description - computed: true, optional: false, required: false
get description() {
return this.getStringAttribute('description');
}
// image - computed: true, optional: false, required: false
get image() {
return this.getStringAttribute('image');
}
// name - computed: true, optional: false, required: false
get name() {
return this.getStringAttribute('name');
}
// region - computed: true, optional: false, required: false
get region() {
return this.getStringAttribute('region');
}
}
exports.ImagebuilderImageOutputResourcesAmisOutputReference = ImagebuilderImageOutputResourcesAmisOutputReference;
_a = JSII_RTTI_SYMBOL_1;
ImagebuilderImageOutputResourcesAmisOutputReference[_a] = { fqn: "@cdktf/provider-aws.imagebuilderImage.ImagebuilderImageOutputResourcesAmisOutputReference", version: "21.22.1" };
class ImagebuilderImageOutputResourcesAmisList 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 ImagebuilderImageOutputResourcesAmisOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ImagebuilderImageOutputResourcesAmisList = ImagebuilderImageOutputResourcesAmisList;
_b = JSII_RTTI_SYMBOL_1;
ImagebuilderImageOutputResourcesAmisList[_b] = { fqn: "@cdktf/provider-aws.imagebuilderImage.ImagebuilderImageOutputResourcesAmisList", version: "21.22.1" };
function imagebuilderImageOutputResourcesContainersToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {};
}
function imagebuilderImageOutputResourcesContainersToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {};
return attrs;
}
class ImagebuilderImageOutputResourcesContainersOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) {
super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
}
}
// image_uris - computed: true, optional: false, required: false
get imageUris() {
return cdktf.Fn.tolist(this.getListAttribute('image_uris'));
}
// region - computed: true, optional: false, required: false
get region() {
return this.getStringAttribute('region');
}
}
exports.ImagebuilderImageOutputResourcesContainersOutputReference = ImagebuilderImageOutputResourcesContainersOutputReference;
_c = JSII_RTTI_SYMBOL_1;
ImagebuilderImageOutputResourcesContainersOutputReference[_c] = { fqn: "@cdktf/provider-aws.imagebuilderImage.ImagebuilderImageOutputResourcesContainersOutputReference", version: "21.22.1" };
class ImagebuilderImageOutputResourcesContainersList 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 ImagebuilderImageOutputResourcesContainersOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ImagebuilderImageOutputResourcesContainersList = ImagebuilderImageOutputResourcesContainersList;
_d = JSII_RTTI_SYMBOL_1;
ImagebuilderImageOutputResourcesContainersList[_d] = { fqn: "@cdktf/provider-aws.imagebuilderImage.ImagebuilderImageOutputResourcesContainersList", version: "21.22.1" };
function imagebuilderImageOutputResourcesToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {};
}
function imagebuilderImageOutputResourcesToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {};
return attrs;
}
class ImagebuilderImageOutputResourcesOutputReference 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;
// amis - computed: true, optional: false, required: false
this._amis = new ImagebuilderImageOutputResourcesAmisList(this, "amis", true);
// containers - computed: true, optional: false, required: false
this._containers = new ImagebuilderImageOutputResourcesContainersList(this, "containers", true);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
}
}
get amis() {
return this._amis;
}
get containers() {
return this._containers;
}
}
exports.ImagebuilderImageOutputResourcesOutputReference = ImagebuilderImageOutputResourcesOutputReference;
_e = JSII_RTTI_SYMBOL_1;
ImagebuilderImageOutputResourcesOutputReference[_e] = { fqn: "@cdktf/provider-aws.imagebuilderImage.ImagebuilderImageOutputResourcesOutputReference", version: "21.22.1" };
class ImagebuilderImageOutputResourcesList 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 ImagebuilderImageOutputResourcesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ImagebuilderImageOutputResourcesList = ImagebuilderImageOutputResourcesList;
_f = JSII_RTTI_SYMBOL_1;
ImagebuilderImageOutputResourcesList[_f] = { fqn: "@cdktf/provider-aws.imagebuilderImage.ImagebuilderImageOutputResourcesList", version: "21.22.1" };
function imagebuilderImageImageScanningConfigurationEcrConfigurationToTerraform(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 {
container_tags: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.containerTags),
repository_name: cdktf.stringToTerraform(struct.repositoryName),
};
}
function imagebuilderImageImageScanningConfigurationEcrConfigurationToHclTerraform(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 = {
container_tags: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.containerTags),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
repository_name: {
value: cdktf.stringToHclTerraform(struct.repositoryName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ImagebuilderImageImageScanningConfigurationEcrConfigurationOutputReference 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._containerTags !== undefined) {
hasAnyValues = true;
internalValueResult.containerTags = this._containerTags;
}
if (this._repositoryName !== undefined) {
hasAnyValues = true;
internalValueResult.repositoryName = this._repositoryName;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._containerTags = undefined;
this._repositoryName = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._containerTags = value.containerTags;
this._repositoryName = value.repositoryName;
}
}
get containerTags() {
return cdktf.Fn.tolist(this.getListAttribute('container_tags'));
}
set containerTags(value) {
this._containerTags = value;
}
resetContainerTags() {
this._containerTags = undefined;
}
// Temporarily expose input value. Use with caution.
get containerTagsInput() {
return this._containerTags;
}
get repositoryName() {
return this.getStringAttribute('repository_name');
}
set repositoryName(value) {
this._repositoryName = value;
}
resetRepositoryName() {
this._repositoryName = undefined;
}
// Temporarily expose input value. Use with caution.
get repositoryNameInput() {
return this._repositoryName;
}
}
exports.ImagebuilderImageImageScanningConfigurationEcrConfigurationOutputReference = ImagebuilderImageImageScanningConfigurationEcrConfigurationOutputReference;
_g = JSII_RTTI_SYMBOL_1;
ImagebuilderImageImageScanningConfigurationEcrConfigurationOutputReference[_g] = { fqn: "@cdktf/provider-aws.imagebuilderImage.ImagebuilderImageImageScanningConfigurationEcrConfigurationOutputReference", version: "21.22.1" };
function imagebuilderImageImageScanningConfigurationToTerraform(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_scanning_enabled: cdktf.booleanToTerraform(struct.imageScanningEnabled),
ecr_configuration: imagebuilderImageImageScanningConfigurationEcrConfigurationToTerraform(struct.ecrConfiguration),
};
}
function imagebuilderImageImageScanningConfigurationToHclTerraform(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_scanning_enabled: {
value: cdktf.booleanToHclTerraform(struct.imageScanningEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
ecr_configuration: {
value: imagebuilderImageImageScanningConfigurationEcrConfigurationToHclTerraform(struct.ecrConfiguration),
isBlock: true,
type: "list",
storageClassType: "ImagebuilderImageImageScanningConfigurationEcrConfigurationList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ImagebuilderImageImageScanningConfigurationOutputReference 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;
// ecr_configuration - computed: false, optional: true, required: false
this._ecrConfiguration = new ImagebuilderImageImageScanningConfigurationEcrConfigurationOutputReference(this, "ecr_configuration");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._imageScanningEnabled !== undefined) {
hasAnyValues = true;
internalValueResult.imageScanningEnabled = this._imageScanningEnabled;
}
if (this._ecrConfiguration?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.ecrConfiguration = this._ecrConfiguration?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._imageScanningEnabled = undefined;
this._ecrConfiguration.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._imageScanningEnabled = value.imageScanningEnabled;
this._ecrConfiguration.internalValue = value.ecrConfiguration;
}
}
get imageScanningEnabled() {
return this.getBooleanAttribute('image_scanning_enabled');
}
set imageScanningEnabled(value) {
this._imageScanningEnabled = value;
}
resetImageScanningEnabled() {
this._imageScanningEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get imageScanningEnabledInput() {
return this._imageScanningEnabled;
}
get ecrConfiguration() {
return this._ecrConfiguration;
}
putEcrConfiguration(value) {
this._ecrConfiguration.internalValue = value;
}
resetEcrConfiguration() {
this._ecrConfiguration.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get ecrConfigurationInput() {
return this._ecrConfiguration.internalValue;
}
}
exports.ImagebuilderImageImageScanningConfigurationOutputReference = ImagebuilderImageImageScanningConfigurationOutputReference;
_h = JSII_RTTI_SYMBOL_1;
ImagebuilderImageImageScanningConfigurationOutputReference[_h] = { fqn: "@cdktf/provider-aws.imagebuilderImage.ImagebuilderImageImageScanningConfigurationOutputReference", version: "21.22.1" };
function imagebuilderImageImageTestsConfigurationToTerraform(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_tests_enabled: cdktf.booleanToTerraform(struct.imageTestsEnabled),
timeout_minutes: cdktf.numberToTerraform(struct.timeoutMinutes),
};
}
function imagebuilderImageImageTestsConfigurationToHclTerraform(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_tests_enabled: {
value: cdktf.booleanToHclTerraform(struct.imageTestsEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
timeout_minutes: {
value: cdktf.numberToHclTerraform(struct.timeoutMinutes),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ImagebuilderImageImageTestsConfigurationOutputReference 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._imageTestsEnabled !== undefined) {
hasAnyValues = true;
internalValueResult.imageTestsEnabled = this._imageTestsEnabled;
}
if (this._timeoutMinutes !== undefined) {
hasAnyValues = true;
internalValueResult.timeoutMinutes = this._timeoutMinutes;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._imageTestsEnabled = undefined;
this._timeoutMinutes = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._imageTestsEnabled = value.imageTestsEnabled;
this._timeoutMinutes = value.timeoutMinutes;
}
}
get imageTestsEnabled() {
return this.getBooleanAttribute('image_tests_enabled');
}
set imageTestsEnabled(value) {
this._imageTestsEnabled = value;
}
resetImageTestsEnabled() {
this._imageTestsEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get imageTestsEnabledInput() {
return this._imageTestsEnabled;
}
get timeoutMinutes() {
return this.getNumberAttribute('timeout_minutes');
}
set timeoutMinutes(value) {
this._timeoutMinutes = value;
}
resetTimeoutMinutes() {
this._timeoutMinutes = undefined;
}
// Temporarily expose input value. Use with caution.
get timeoutMinutesInput() {
return this._timeoutMinutes;
}
}
exports.ImagebuilderImageImageTestsConfigurationOutputReference = ImagebuilderImageImageTestsConfigurationOutputReference;
_j = JSII_RTTI_SYMBOL_1;
ImagebuilderImageImageTestsConfigurationOutputReference[_j] = { fqn: "@cdktf/provider-aws.imagebuilderImage.ImagebuilderImageImageTestsConfigurationOutputReference", version: "21.22.1" };
function imagebuilderImageTimeoutsToTerraform(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 {
create: cdktf.stringToTerraform(struct.create),
};
}
function imagebuilderImageTimeoutsToHclTerraform(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 = {
create: {
value: cdktf.stringToHclTerraform(struct.create),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ImagebuilderImageTimeoutsOutputReference 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);
this.isEmptyObject = false;
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._create !== undefined) {
hasAnyValues = true;
internalValueResult.create = this._create;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._create = 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._create = value.create;
}
}
get create() {
return this.getStringAttribute('create');
}
set create(value) {
this._create = value;
}
resetCreate() {
this._create = undefined;
}
// Temporarily expose input value. Use with caution.
get createInput() {
return this._create;
}
}
exports.ImagebuilderImageTimeoutsOutputReference = ImagebuilderImageTimeoutsOutputReference;
_k = JSII_RTTI_SYMBOL_1;
ImagebuilderImageTimeoutsOutputReference[_k] = { fqn: "@cdktf/provider-aws.imagebuilderImage.ImagebuilderImageTimeoutsOutputReference", version: "21.22.1" };
function imagebuilderImageWorkflowParameterToTerraform(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 imagebuilderImageWorkflowParameterToHclTerraform(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 ImagebuilderImageWorkflowParameterOutputReference 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.ImagebuilderImageWorkflowParameterOutputReference = ImagebuilderImageWorkflowParameterOutputReference;
_l = JSII_RTTI_SYMBOL_1;
ImagebuilderImageWorkflowParameterOutputReference[_l] = { fqn: "@cdktf/provider-aws.imagebuilderImage.ImagebuilderImageWorkflowParameterOutputReference", version: "21.22.1" };
class ImagebuilderImageWorkflowParameterList 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 ImagebuilderImageWorkflowParameterOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ImagebuilderImageWorkflowParameterList = ImagebuilderImageWorkflowParameterList;
_m = JSII_RTTI_SYMBOL_1;
ImagebuilderImageWorkflowParameterList[_m] = { fqn: "@cdktf/provider-aws.imagebuilderImage.ImagebuilderImageWorkflowParameterList", version: "21.22.1" };
function imagebuilderImageWorkflowToTerraform(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 {
on_failure: cdktf.stringToTerraform(struct.onFailure),
parallel_group: cdktf.stringToTerraform(struct.parallelGroup),
workflow_arn: cdktf.stringToTerraform(struct.workflowArn),
parameter: cdktf.listMapper(imagebuilderImageWorkflowParameterToTerraform, true)(struct.parameter),
};
}
function imagebuilderImageWorkflowToHclTerraform(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 = {
on_failure: {
value: cdktf.stringToHclTerraform(struct.onFailure),
isBlock: false,
type: "simple",
storageClassType: "string",
},
parallel_group: {
value: cdktf.stringToHclTerraform(struct.parallelGroup),
isBlock: false,
type: "simple",
storageClassType: "string",
},
workflow_arn: {
value: cdktf.stringToHclTerraform(struct.workflowArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
parameter: {
value: cdktf.listMapperHcl(imagebuilderImageWorkflowParameterToHclTerraform, true)(struct.parameter),
isBlock: true,
type: "set",
storageClassType: "ImagebuilderImageWorkflowParameterList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ImagebuilderImageWorkflowOutputReference 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 ImagebuilderImageWorkflowParameterList(this, "parameter", true);
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._onFailure !== undefined) {
hasAnyValues = true;
internalValueResult.onFailure = this._onFailure;
}
if (this._parallelGroup !== undefined) {
hasAnyValues = true;
internalValueResult.parallelGroup = this._parallelGroup;
}
if (this._workflowArn !== undefined) {
hasAnyValues = true;
internalValueResult.workflowArn = this._workflowArn;
}
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._onFailure = undefined;
this._parallelGroup = undefined;
this._workflowArn = 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._onFailure = value.onFailure;
this._parallelGroup = value.parallelGroup;
this._workflowArn = value.workflowArn;
this._parameter.internalValue = value.parameter;
}
}
get onFailure() {
return this.getStringAttribute('on_failure');
}
set onFailure(value) {
this._onFailure = value;
}
resetOnFailure() {
this._onFailure = undefined;
}
// Temporarily expose input value. Use with caution.
get onFailureInput() {
return this._onFailure;
}
get parallelGroup() {
return this.getStringAttribute('parallel_group');
}
set parallelGroup(value) {
this._parallelGroup = value;
}
resetParallelGroup() {
this._parallelGroup = undefined;
}
// Temporarily expose input value. Use with caution.
get parallelGroupInput() {
return this._parallelGroup;
}
get workflowArn() {
return this.getStringAttribute('workflow_arn');
}
set workflowArn(value) {
this._workflowArn = value;
}
// Temporarily expose input value. Use with caution.
get workflowArnInput() {
return this._workflowArn;
}
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.ImagebuilderImageWorkflowOutputReference = ImagebuilderImageWorkflowOutputReference;
_o = JSII_RTTI_SYMBOL_1;
ImagebuilderImageWorkflowOutputReference[_o] = { fqn: "@cdktf/provider-aws.imagebuilderImage.ImagebuilderImageWorkflowOutputReference", version: "21.22.1" };
class ImagebuilderImageWorkflowList 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 ImagebuilderImageWorkflowOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ImagebuilderImageWorkflowList = ImagebuilderImageWorkflowList;
_p = JSII_RTTI_SYMBOL_1;
ImagebuilderImageWorkflowList[_p] = { fqn: "@cdktf/provider-aws.imagebuilderImage.ImagebuilderImageWorkflowList", version: "21.22.1" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/imagebuilder_image aws_imagebuilder_image}
*/
class ImagebuilderImage extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a ImagebuilderImage 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 ImagebuilderImage to import
* @param importFromId The id of the existing ImagebuilderImage that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/imagebuilder_image#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the ImagebuilderImage to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_imagebuilder_image", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/imagebuilder_image aws_imagebuilder_image} 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 ImagebuilderImageConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'aws_imagebuilder_image',
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
});
// output_resources - computed: true, optional: false, required: false
this._outputResources = new ImagebuilderImageOutputResourcesList(this, "output_resources", false);
// image_scanning_configuration - computed: false, optional: true, required: false
this._imageScanningConfiguration = new ImagebuilderImageImageScanningConfigurationOutputReference(this, "image_scanning_configuration");
// image_tests_configuration - computed: false, optional: true, required: false
this._imageTestsConfiguration = new ImagebuilderImageImageTestsConfigurationOutputReference(this, "image_tests_configuration");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new ImagebuilderImageTimeoutsOutputReference(this, "timeouts");
// workflow - computed: false, optional: true, required: false
this._workflow = new ImagebuilderImageWorkflowList(this, "workflow", true);
this._containerRecipeArn = config.containerRecipeArn;
this._distributionConfigurationArn = config.distributionConfigurationArn;
this._enhancedImageMetadataEnabled = config.enhancedImageMetadataEnabled;
this._executionRole = config.executionRole;
this._id = config.id;
this._imageRecipeArn = config.imageRecipeArn;
this._infrastructureConfigurationArn = config.infrastructureConfigurationArn;
this._region = config.region;
this._tags = config.tags;
this._tagsAll = config.tagsAll;
this._imageScanningConfiguration.internalValue = config.imageScanningConfiguration;
this._imageTestsConfiguration.internalValue = config.imageTestsConfiguration;
this._timeouts.internalValue = config.timeouts;
this._workflow.internalValue = config.workflow;
}
// ==========
// ATTRIBUTES
// ==========
// arn - computed: true, optional: false, required: false
get arn() {
return this.getStringAttribute('arn');
}
get containerRecipeArn() {
return this.getStringAttribute('container_recipe_arn');
}
set containerRecipeArn(value) {
this._containerRecipeArn = value;
}
resetContainerRecipeArn() {
this._containerRecipeArn = undefined;
}
// Temporarily expose input value. Use with caution.
get containerRecipeArnInput() {
return this._containerRecipeArn;
}
// date_created - computed: true, optional: false, required: false
get dateCreated() {
return this.getStringAttribute('date_created');
}
get distributionConfigurationArn() {
return this.getStringAttribute('distribution_configuration_arn');
}
set distributionConfigurationArn(value) {
this._distributionConfigurationArn = value;
}
resetDistributionConfigurationArn() {
this._distributionConfigurationArn = undefined;
}
// Temporarily expose input value. Use with caution.
get distributionConfigurationArnInput() {
return this._distributionConfigurationArn;
}
get enhancedImageMetadataEnabled() {
return this.getBooleanAttribute('enhanced_image_metadata_enabled');
}
set enhancedImageMetadataEnabled(value) {
this._enhancedImageMetadataEnabled = value;
}
resetEnhancedImageMetadataEnabled() {
this._enhancedImageMetadataEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get enhancedImageMetadataEnabledInput() {
return this._enhancedImageMetadataEnabled;
}
get executionRole() {
return this.getStringAttribute('execution_role');
}
set executionRole(value) {
this._executionRole = value;
}
resetExecutionRole() {
this._executionRole = undefined;
}
// Temporarily expose input value. Use with caution.
get executionRoleInput() {
return this._executionRole;
}
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 imageRecipeArn() {
return this.getStringAttribute('image_recipe_arn');
}
set imageRecipeArn(value) {
this._imageRecipeArn = value;
}
resetImageRecipeArn() {
this._imageRecipeArn = undefined;
}
// Temporarily expose input value. Use with caution.
get imageRecipeArnInput() {
return this._imageRecipeArn;
}
get infrastructureConfigurationArn() {
return this.getStringAttribute('infrastructure_configuration_arn');
}
set infrastructureConfigurationArn(value) {