UNPKG

@cdktf/provider-aws

Version:

Prebuilt aws Provider for Terraform CDK (cdktf)

1,007 lines 280 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; Object.defineProperty(exports, "__esModule", { value: true }); exports.ImagebuilderDistributionConfiguration = exports.ImagebuilderDistributionConfigurationDistributionList = exports.ImagebuilderDistributionConfigurationDistributionOutputReference = exports.imagebuilderDistributionConfigurationDistributionToHclTerraform = exports.imagebuilderDistributionConfigurationDistributionToTerraform = exports.ImagebuilderDistributionConfigurationDistributionS3ExportConfigurationOutputReference = exports.imagebuilderDistributionConfigurationDistributionS3ExportConfigurationToHclTerraform = exports.imagebuilderDistributionConfigurationDistributionS3ExportConfigurationToTerraform = exports.ImagebuilderDistributionConfigurationDistributionLaunchTemplateConfigurationList = exports.ImagebuilderDistributionConfigurationDistributionLaunchTemplateConfigurationOutputReference = exports.imagebuilderDistributionConfigurationDistributionLaunchTemplateConfigurationToHclTerraform = exports.imagebuilderDistributionConfigurationDistributionLaunchTemplateConfigurationToTerraform = exports.ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationList = exports.ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationOutputReference = exports.imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationToHclTerraform = exports.imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationToTerraform = exports.ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationOutputReference = exports.imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationToHclTerraform = exports.imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationToTerraform = exports.ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateOutputReference = exports.imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateToHclTerraform = exports.imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateToTerraform = exports.ImagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationOutputReference = exports.imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationToHclTerraform = exports.imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationToTerraform = exports.ImagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryOutputReference = exports.imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryToHclTerraform = exports.imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryToTerraform = exports.ImagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationOutputReference = exports.imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationToHclTerraform = exports.imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationToTerraform = exports.ImagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionOutputReference = exports.imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionToHclTerraform = exports.imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionToTerraform(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 { organization_arns: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.organizationArns), organizational_unit_arns: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.organizationalUnitArns), user_groups: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.userGroups), user_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.userIds), }; } exports.imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionToTerraform = imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionToTerraform; function imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionToHclTerraform(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 = { organization_arns: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.organizationArns), isBlock: false, type: "set", storageClassType: "stringList", }, organizational_unit_arns: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.organizationalUnitArns), isBlock: false, type: "set", storageClassType: "stringList", }, user_groups: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.userGroups), isBlock: false, type: "set", storageClassType: "stringList", }, user_ids: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.userIds), isBlock: false, type: "set", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionToHclTerraform = imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionToHclTerraform; class ImagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionOutputReference 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._organizationArns !== undefined) { hasAnyValues = true; internalValueResult.organizationArns = this._organizationArns; } if (this._organizationalUnitArns !== undefined) { hasAnyValues = true; internalValueResult.organizationalUnitArns = this._organizationalUnitArns; } if (this._userGroups !== undefined) { hasAnyValues = true; internalValueResult.userGroups = this._userGroups; } if (this._userIds !== undefined) { hasAnyValues = true; internalValueResult.userIds = this._userIds; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._organizationArns = undefined; this._organizationalUnitArns = undefined; this._userGroups = undefined; this._userIds = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._organizationArns = value.organizationArns; this._organizationalUnitArns = value.organizationalUnitArns; this._userGroups = value.userGroups; this._userIds = value.userIds; } } get organizationArns() { return cdktf.Fn.tolist(this.getListAttribute('organization_arns')); } set organizationArns(value) { this._organizationArns = value; } resetOrganizationArns() { this._organizationArns = undefined; } // Temporarily expose input value. Use with caution. get organizationArnsInput() { return this._organizationArns; } get organizationalUnitArns() { return cdktf.Fn.tolist(this.getListAttribute('organizational_unit_arns')); } set organizationalUnitArns(value) { this._organizationalUnitArns = value; } resetOrganizationalUnitArns() { this._organizationalUnitArns = undefined; } // Temporarily expose input value. Use with caution. get organizationalUnitArnsInput() { return this._organizationalUnitArns; } get userGroups() { return cdktf.Fn.tolist(this.getListAttribute('user_groups')); } set userGroups(value) { this._userGroups = value; } resetUserGroups() { this._userGroups = undefined; } // Temporarily expose input value. Use with caution. get userGroupsInput() { return this._userGroups; } get userIds() { return cdktf.Fn.tolist(this.getListAttribute('user_ids')); } set userIds(value) { this._userIds = value; } resetUserIds() { this._userIds = undefined; } // Temporarily expose input value. Use with caution. get userIdsInput() { return this._userIds; } } exports.ImagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionOutputReference = ImagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionOutputReference; _a = JSII_RTTI_SYMBOL_1; ImagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionOutputReference[_a] = { fqn: "@cdktf/provider-aws.imagebuilderDistributionConfiguration.ImagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionOutputReference", version: "19.50.0" }; function imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationToTerraform(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 { ami_tags: cdktf.hashMapper(cdktf.stringToTerraform)(struct.amiTags), description: cdktf.stringToTerraform(struct.description), kms_key_id: cdktf.stringToTerraform(struct.kmsKeyId), name: cdktf.stringToTerraform(struct.name), target_account_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.targetAccountIds), launch_permission: imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionToTerraform(struct.launchPermission), }; } exports.imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationToTerraform = imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationToTerraform; function imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationToHclTerraform(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 = { ami_tags: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.amiTags), isBlock: false, type: "map", storageClassType: "stringMap", }, description: { value: cdktf.stringToHclTerraform(struct.description), isBlock: false, type: "simple", storageClassType: "string", }, kms_key_id: { value: cdktf.stringToHclTerraform(struct.kmsKeyId), isBlock: false, type: "simple", storageClassType: "string", }, name: { value: cdktf.stringToHclTerraform(struct.name), isBlock: false, type: "simple", storageClassType: "string", }, target_account_ids: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.targetAccountIds), isBlock: false, type: "set", storageClassType: "stringList", }, launch_permission: { value: imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionToHclTerraform(struct.launchPermission), isBlock: true, type: "list", storageClassType: "ImagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationToHclTerraform = imagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationToHclTerraform; class ImagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationOutputReference 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; // launch_permission - computed: false, optional: true, required: false this._launchPermission = new ImagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationLaunchPermissionOutputReference(this, "launch_permission"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._amiTags !== undefined) { hasAnyValues = true; internalValueResult.amiTags = this._amiTags; } if (this._description !== undefined) { hasAnyValues = true; internalValueResult.description = this._description; } if (this._kmsKeyId !== undefined) { hasAnyValues = true; internalValueResult.kmsKeyId = this._kmsKeyId; } if (this._name !== undefined) { hasAnyValues = true; internalValueResult.name = this._name; } if (this._targetAccountIds !== undefined) { hasAnyValues = true; internalValueResult.targetAccountIds = this._targetAccountIds; } if (this._launchPermission?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.launchPermission = this._launchPermission?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._amiTags = undefined; this._description = undefined; this._kmsKeyId = undefined; this._name = undefined; this._targetAccountIds = undefined; this._launchPermission.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._amiTags = value.amiTags; this._description = value.description; this._kmsKeyId = value.kmsKeyId; this._name = value.name; this._targetAccountIds = value.targetAccountIds; this._launchPermission.internalValue = value.launchPermission; } } get amiTags() { return this.getStringMapAttribute('ami_tags'); } set amiTags(value) { this._amiTags = value; } resetAmiTags() { this._amiTags = undefined; } // Temporarily expose input value. Use with caution. get amiTagsInput() { return this._amiTags; } 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 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; } resetName() { this._name = undefined; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get targetAccountIds() { return cdktf.Fn.tolist(this.getListAttribute('target_account_ids')); } set targetAccountIds(value) { this._targetAccountIds = value; } resetTargetAccountIds() { this._targetAccountIds = undefined; } // Temporarily expose input value. Use with caution. get targetAccountIdsInput() { return this._targetAccountIds; } get launchPermission() { return this._launchPermission; } putLaunchPermission(value) { this._launchPermission.internalValue = value; } resetLaunchPermission() { this._launchPermission.internalValue = undefined; } // Temporarily expose input value. Use with caution. get launchPermissionInput() { return this._launchPermission.internalValue; } } exports.ImagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationOutputReference = ImagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationOutputReference; _b = JSII_RTTI_SYMBOL_1; ImagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationOutputReference[_b] = { fqn: "@cdktf/provider-aws.imagebuilderDistributionConfiguration.ImagebuilderDistributionConfigurationDistributionAmiDistributionConfigurationOutputReference", version: "19.50.0" }; function imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryToTerraform(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), }; } exports.imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryToTerraform = imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryToTerraform; function imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryToHclTerraform(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)); } exports.imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryToHclTerraform = imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryToHclTerraform; class ImagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryOutputReference 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.ImagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryOutputReference = ImagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryOutputReference; _c = JSII_RTTI_SYMBOL_1; ImagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryOutputReference[_c] = { fqn: "@cdktf/provider-aws.imagebuilderDistributionConfiguration.ImagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryOutputReference", version: "19.50.0" }; function imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationToTerraform(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), description: cdktf.stringToTerraform(struct.description), target_repository: imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryToTerraform(struct.targetRepository), }; } exports.imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationToTerraform = imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationToTerraform; function imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationToHclTerraform(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", }, description: { value: cdktf.stringToHclTerraform(struct.description), isBlock: false, type: "simple", storageClassType: "string", }, target_repository: { value: imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryToHclTerraform(struct.targetRepository), isBlock: true, type: "list", storageClassType: "ImagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationToHclTerraform = imagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationToHclTerraform; class ImagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationOutputReference 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; // target_repository - computed: false, optional: false, required: true this._targetRepository = new ImagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationTargetRepositoryOutputReference(this, "target_repository"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._containerTags !== undefined) { hasAnyValues = true; internalValueResult.containerTags = this._containerTags; } if (this._description !== undefined) { hasAnyValues = true; internalValueResult.description = this._description; } if (this._targetRepository?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.targetRepository = this._targetRepository?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._containerTags = undefined; this._description = undefined; this._targetRepository.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._containerTags = value.containerTags; this._description = value.description; this._targetRepository.internalValue = value.targetRepository; } } 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 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 targetRepository() { return this._targetRepository; } putTargetRepository(value) { this._targetRepository.internalValue = value; } // Temporarily expose input value. Use with caution. get targetRepositoryInput() { return this._targetRepository.internalValue; } } exports.ImagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationOutputReference = ImagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationOutputReference; _d = JSII_RTTI_SYMBOL_1; ImagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationOutputReference[_d] = { fqn: "@cdktf/provider-aws.imagebuilderDistributionConfiguration.ImagebuilderDistributionConfigurationDistributionContainerDistributionConfigurationOutputReference", version: "19.50.0" }; function imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateToTerraform(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 { launch_template_id: cdktf.stringToTerraform(struct.launchTemplateId), launch_template_name: cdktf.stringToTerraform(struct.launchTemplateName), launch_template_version: cdktf.stringToTerraform(struct.launchTemplateVersion), }; } exports.imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateToTerraform = imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateToTerraform; function imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateToHclTerraform(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 = { launch_template_id: { value: cdktf.stringToHclTerraform(struct.launchTemplateId), isBlock: false, type: "simple", storageClassType: "string", }, launch_template_name: { value: cdktf.stringToHclTerraform(struct.launchTemplateName), isBlock: false, type: "simple", storageClassType: "string", }, launch_template_version: { value: cdktf.stringToHclTerraform(struct.launchTemplateVersion), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateToHclTerraform = imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateToHclTerraform; class ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateOutputReference 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._launchTemplateId !== undefined) { hasAnyValues = true; internalValueResult.launchTemplateId = this._launchTemplateId; } if (this._launchTemplateName !== undefined) { hasAnyValues = true; internalValueResult.launchTemplateName = this._launchTemplateName; } if (this._launchTemplateVersion !== undefined) { hasAnyValues = true; internalValueResult.launchTemplateVersion = this._launchTemplateVersion; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._launchTemplateId = undefined; this._launchTemplateName = undefined; this._launchTemplateVersion = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._launchTemplateId = value.launchTemplateId; this._launchTemplateName = value.launchTemplateName; this._launchTemplateVersion = value.launchTemplateVersion; } } get launchTemplateId() { return this.getStringAttribute('launch_template_id'); } set launchTemplateId(value) { this._launchTemplateId = value; } resetLaunchTemplateId() { this._launchTemplateId = undefined; } // Temporarily expose input value. Use with caution. get launchTemplateIdInput() { return this._launchTemplateId; } get launchTemplateName() { return this.getStringAttribute('launch_template_name'); } set launchTemplateName(value) { this._launchTemplateName = value; } resetLaunchTemplateName() { this._launchTemplateName = undefined; } // Temporarily expose input value. Use with caution. get launchTemplateNameInput() { return this._launchTemplateName; } get launchTemplateVersion() { return this.getStringAttribute('launch_template_version'); } set launchTemplateVersion(value) { this._launchTemplateVersion = value; } resetLaunchTemplateVersion() { this._launchTemplateVersion = undefined; } // Temporarily expose input value. Use with caution. get launchTemplateVersionInput() { return this._launchTemplateVersion; } } exports.ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateOutputReference = ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateOutputReference; _e = JSII_RTTI_SYMBOL_1; ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateOutputReference[_e] = { fqn: "@cdktf/provider-aws.imagebuilderDistributionConfiguration.ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateOutputReference", version: "19.50.0" }; function imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationToTerraform(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 { target_resource_count: cdktf.numberToTerraform(struct.targetResourceCount), }; } exports.imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationToTerraform = imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationToTerraform; function imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationToHclTerraform(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 = { target_resource_count: { value: cdktf.numberToHclTerraform(struct.targetResourceCount), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationToHclTerraform = imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationToHclTerraform; class ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationOutputReference 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._targetResourceCount !== undefined) { hasAnyValues = true; internalValueResult.targetResourceCount = this._targetResourceCount; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._targetResourceCount = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._targetResourceCount = value.targetResourceCount; } } get targetResourceCount() { return this.getNumberAttribute('target_resource_count'); } set targetResourceCount(value) { this._targetResourceCount = value; } resetTargetResourceCount() { this._targetResourceCount = undefined; } // Temporarily expose input value. Use with caution. get targetResourceCountInput() { return this._targetResourceCount; } } exports.ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationOutputReference = ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationOutputReference; _f = JSII_RTTI_SYMBOL_1; ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationOutputReference[_f] = { fqn: "@cdktf/provider-aws.imagebuilderDistributionConfiguration.ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationOutputReference", version: "19.50.0" }; function imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationToTerraform(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 { account_id: cdktf.stringToTerraform(struct.accountId), enabled: cdktf.booleanToTerraform(struct.enabled), max_parallel_launches: cdktf.numberToTerraform(struct.maxParallelLaunches), launch_template: imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateToTerraform(struct.launchTemplate), snapshot_configuration: imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationToTerraform(struct.snapshotConfiguration), }; } exports.imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationToTerraform = imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationToTerraform; function imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationToHclTerraform(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 = { account_id: { value: cdktf.stringToHclTerraform(struct.accountId), isBlock: false, type: "simple", storageClassType: "string", }, enabled: { value: cdktf.booleanToHclTerraform(struct.enabled), isBlock: false, type: "simple", storageClassType: "boolean", }, max_parallel_launches: { value: cdktf.numberToHclTerraform(struct.maxParallelLaunches), isBlock: false, type: "simple", storageClassType: "number", }, launch_template: { value: imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateToHclTerraform(struct.launchTemplate), isBlock: true, type: "list", storageClassType: "ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateList", }, snapshot_configuration: { value: imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationToHclTerraform(struct.snapshotConfiguration), isBlock: true, type: "list", storageClassType: "ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationToHclTerraform = imagebuilderDistributionConfigurationDistributionFastLaunchConfigurationToHclTerraform; class ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationOutputReference 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; // launch_template - computed: false, optional: true, required: false this._launchTemplate = new ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationLaunchTemplateOutputReference(this, "launch_template"); // snapshot_configuration - computed: false, optional: true, required: false this._snapshotConfiguration = new ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationSnapshotConfigurationOutputReference(this, "snapshot_configuration"); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._accountId !== undefined) { hasAnyValues = true; internalValueResult.accountId = this._accountId; } if (this._enabled !== undefined) { hasAnyValues = true; internalValueResult.enabled = this._enabled; } if (this._maxParallelLaunches !== undefined) { hasAnyValues = true; internalValueResult.maxParallelLaunches = this._maxParallelLaunches; } if (this._launchTemplate?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.launchTemplate = this._launchTemplate?.internalValue; } if (this._snapshotConfiguration?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.snapshotConfiguration = this._snapshotConfiguration?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._accountId = undefined; this._enabled = undefined; this._maxParallelLaunches = undefined; this._launchTemplate.internalValue = undefined; this._snapshotConfiguration.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._accountId = value.accountId; this._enabled = value.enabled; this._maxParallelLaunches = value.maxParallelLaunches; this._launchTemplate.internalValue = value.launchTemplate; this._snapshotConfiguration.internalValue = value.snapshotConfiguration; } } get accountId() { return this.getStringAttribute('account_id'); } set accountId(value) { this._accountId = value; } // Temporarily expose input value. Use with caution. get accountIdInput() { return this._accountId; } get enabled() { return this.getBooleanAttribute('enabled'); } set enabled(value) { this._enabled = value; } // Temporarily expose input value. Use with caution. get enabledInput() { return this._enabled; } get maxParallelLaunches() { return this.getNumberAttribute('max_parallel_launches'); } set maxParallelLaunches(value) { this._maxParallelLaunches = value; } resetMaxParallelLaunches() { this._maxParallelLaunches = undefined; } // Temporarily expose input value. Use with caution. get maxParallelLaunchesInput() { return this._maxParallelLaunches; } get launchTemplate() { return this._launchTemplate; } putLaunchTemplate(value) { this._launchTemplate.internalValue = value; } resetLaunchTemplate() { this._launchTemplate.internalValue = undefined; } // Temporarily expose input value. Use with caution. get launchTemplateInput() { return this._launchTemplate.internalValue; } get snapshotConfiguration() { return this._snapshotConfiguration; } putSnapshotConfiguration(value) { this._snapshotConfiguration.internalValue = value; } resetSnapshotConfiguration() { this._snapshotConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. get snapshotConfigurationInput() { return this._snapshotConfiguration.internalValue; } } exports.ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationOutputReference = ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationOutputReference; _g = JSII_RTTI_SYMBOL_1; ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationOutputReference[_g] = { fqn: "@cdktf/provider-aws.imagebuilderDistributionConfiguration.ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationOutputReference", version: "19.50.0" }; class ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationList 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 ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationList = ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationList; _h = JSII_RTTI_SYMBOL_1; ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationList[_h] = { fqn: "@cdktf/provider-aws.imagebuilderDistributionConfiguration.ImagebuilderDistributionConfigurationDistributionFastLaunchConfigurationList", version: "19.50.0" }; function im