UNPKG

@cdktf/provider-aws

Version:

Prebuilt aws Provider for Terraform CDK (cdktf)

1,087 lines (1,086 loc) 240 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u; Object.defineProperty(exports, "__esModule", { value: true }); exports.ImagebuilderLifecyclePolicy = exports.ImagebuilderLifecyclePolicyResourceSelectionList = exports.ImagebuilderLifecyclePolicyResourceSelectionOutputReference = exports.ImagebuilderLifecyclePolicyResourceSelectionRecipeList = exports.ImagebuilderLifecyclePolicyResourceSelectionRecipeOutputReference = exports.ImagebuilderLifecyclePolicyPolicyDetailList = exports.ImagebuilderLifecyclePolicyPolicyDetailOutputReference = exports.ImagebuilderLifecyclePolicyPolicyDetailFilterList = exports.ImagebuilderLifecyclePolicyPolicyDetailFilterOutputReference = exports.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesList = exports.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesOutputReference = exports.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisList = exports.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisOutputReference = exports.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedList = exports.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedOutputReference = exports.ImagebuilderLifecyclePolicyPolicyDetailActionList = exports.ImagebuilderLifecyclePolicyPolicyDetailActionOutputReference = exports.ImagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesList = exports.ImagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesOutputReference = void 0; exports.imagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesToTerraform = imagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesToTerraform; exports.imagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesToHclTerraform = imagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesToHclTerraform; exports.imagebuilderLifecyclePolicyPolicyDetailActionToTerraform = imagebuilderLifecyclePolicyPolicyDetailActionToTerraform; exports.imagebuilderLifecyclePolicyPolicyDetailActionToHclTerraform = imagebuilderLifecyclePolicyPolicyDetailActionToHclTerraform; exports.imagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedToTerraform = imagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedToTerraform; exports.imagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedToHclTerraform = imagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedToHclTerraform; exports.imagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisToTerraform = imagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisToTerraform; exports.imagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisToHclTerraform = imagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisToHclTerraform; exports.imagebuilderLifecyclePolicyPolicyDetailExclusionRulesToTerraform = imagebuilderLifecyclePolicyPolicyDetailExclusionRulesToTerraform; exports.imagebuilderLifecyclePolicyPolicyDetailExclusionRulesToHclTerraform = imagebuilderLifecyclePolicyPolicyDetailExclusionRulesToHclTerraform; exports.imagebuilderLifecyclePolicyPolicyDetailFilterToTerraform = imagebuilderLifecyclePolicyPolicyDetailFilterToTerraform; exports.imagebuilderLifecyclePolicyPolicyDetailFilterToHclTerraform = imagebuilderLifecyclePolicyPolicyDetailFilterToHclTerraform; exports.imagebuilderLifecyclePolicyPolicyDetailToTerraform = imagebuilderLifecyclePolicyPolicyDetailToTerraform; exports.imagebuilderLifecyclePolicyPolicyDetailToHclTerraform = imagebuilderLifecyclePolicyPolicyDetailToHclTerraform; exports.imagebuilderLifecyclePolicyResourceSelectionRecipeToTerraform = imagebuilderLifecyclePolicyResourceSelectionRecipeToTerraform; exports.imagebuilderLifecyclePolicyResourceSelectionRecipeToHclTerraform = imagebuilderLifecyclePolicyResourceSelectionRecipeToHclTerraform; exports.imagebuilderLifecyclePolicyResourceSelectionToTerraform = imagebuilderLifecyclePolicyResourceSelectionToTerraform; exports.imagebuilderLifecyclePolicyResourceSelectionToHclTerraform = imagebuilderLifecyclePolicyResourceSelectionToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function imagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesToTerraform(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 { amis: cdktf.booleanToTerraform(struct.amis), containers: cdktf.booleanToTerraform(struct.containers), snapshots: cdktf.booleanToTerraform(struct.snapshots), }; } function imagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesToHclTerraform(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 = { amis: { value: cdktf.booleanToHclTerraform(struct.amis), isBlock: false, type: "simple", storageClassType: "boolean", }, containers: { value: cdktf.booleanToHclTerraform(struct.containers), isBlock: false, type: "simple", storageClassType: "boolean", }, snapshots: { value: cdktf.booleanToHclTerraform(struct.snapshots), isBlock: false, type: "simple", storageClassType: "boolean", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ImagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesOutputReference 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._amis !== undefined) { hasAnyValues = true; internalValueResult.amis = this._amis; } if (this._containers !== undefined) { hasAnyValues = true; internalValueResult.containers = this._containers; } if (this._snapshots !== undefined) { hasAnyValues = true; internalValueResult.snapshots = this._snapshots; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._amis = undefined; this._containers = undefined; this._snapshots = 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._amis = value.amis; this._containers = value.containers; this._snapshots = value.snapshots; } } get amis() { return this.getBooleanAttribute('amis'); } set amis(value) { this._amis = value; } resetAmis() { this._amis = undefined; } // Temporarily expose input value. Use with caution. get amisInput() { return this._amis; } get containers() { return this.getBooleanAttribute('containers'); } set containers(value) { this._containers = value; } resetContainers() { this._containers = undefined; } // Temporarily expose input value. Use with caution. get containersInput() { return this._containers; } get snapshots() { return this.getBooleanAttribute('snapshots'); } set snapshots(value) { this._snapshots = value; } resetSnapshots() { this._snapshots = undefined; } // Temporarily expose input value. Use with caution. get snapshotsInput() { return this._snapshots; } } exports.ImagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesOutputReference = ImagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesOutputReference; _a = JSII_RTTI_SYMBOL_1; ImagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesOutputReference[_a] = { fqn: "@cdktf/provider-aws.imagebuilderLifecyclePolicy.ImagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesOutputReference", version: "21.22.1" }; class ImagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesList 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 ImagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ImagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesList = ImagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesList; _b = JSII_RTTI_SYMBOL_1; ImagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesList[_b] = { fqn: "@cdktf/provider-aws.imagebuilderLifecyclePolicy.ImagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesList", version: "21.22.1" }; function imagebuilderLifecyclePolicyPolicyDetailActionToTerraform(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 { type: cdktf.stringToTerraform(struct.type), include_resources: cdktf.listMapper(imagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesToTerraform, true)(struct.includeResources), }; } function imagebuilderLifecyclePolicyPolicyDetailActionToHclTerraform(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 = { type: { value: cdktf.stringToHclTerraform(struct.type), isBlock: false, type: "simple", storageClassType: "string", }, include_resources: { value: cdktf.listMapperHcl(imagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesToHclTerraform, true)(struct.includeResources), isBlock: true, type: "list", storageClassType: "ImagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ImagebuilderLifecyclePolicyPolicyDetailActionOutputReference 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; // include_resources - computed: false, optional: true, required: false this._includeResources = new ImagebuilderLifecyclePolicyPolicyDetailActionIncludeResourcesList(this, "include_resources", false); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._type !== undefined) { hasAnyValues = true; internalValueResult.type = this._type; } if (this._includeResources?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.includeResources = this._includeResources?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._type = undefined; this._includeResources.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._type = value.type; this._includeResources.internalValue = value.includeResources; } } get type() { return this.getStringAttribute('type'); } set type(value) { this._type = value; } // Temporarily expose input value. Use with caution. get typeInput() { return this._type; } get includeResources() { return this._includeResources; } putIncludeResources(value) { this._includeResources.internalValue = value; } resetIncludeResources() { this._includeResources.internalValue = undefined; } // Temporarily expose input value. Use with caution. get includeResourcesInput() { return this._includeResources.internalValue; } } exports.ImagebuilderLifecyclePolicyPolicyDetailActionOutputReference = ImagebuilderLifecyclePolicyPolicyDetailActionOutputReference; _c = JSII_RTTI_SYMBOL_1; ImagebuilderLifecyclePolicyPolicyDetailActionOutputReference[_c] = { fqn: "@cdktf/provider-aws.imagebuilderLifecyclePolicy.ImagebuilderLifecyclePolicyPolicyDetailActionOutputReference", version: "21.22.1" }; class ImagebuilderLifecyclePolicyPolicyDetailActionList 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 ImagebuilderLifecyclePolicyPolicyDetailActionOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ImagebuilderLifecyclePolicyPolicyDetailActionList = ImagebuilderLifecyclePolicyPolicyDetailActionList; _d = JSII_RTTI_SYMBOL_1; ImagebuilderLifecyclePolicyPolicyDetailActionList[_d] = { fqn: "@cdktf/provider-aws.imagebuilderLifecyclePolicy.ImagebuilderLifecyclePolicyPolicyDetailActionList", version: "21.22.1" }; function imagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedToTerraform(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 { unit: cdktf.stringToTerraform(struct.unit), value: cdktf.numberToTerraform(struct.value), }; } function imagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedToHclTerraform(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 = { unit: { value: cdktf.stringToHclTerraform(struct.unit), isBlock: false, type: "simple", storageClassType: "string", }, value: { value: cdktf.numberToHclTerraform(struct.value), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedOutputReference 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._unit !== undefined) { hasAnyValues = true; internalValueResult.unit = this._unit; } 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._unit = 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._unit = value.unit; this._value = value.value; } } get unit() { return this.getStringAttribute('unit'); } set unit(value) { this._unit = value; } // Temporarily expose input value. Use with caution. get unitInput() { return this._unit; } get value() { return this.getNumberAttribute('value'); } set value(value) { this._value = value; } // Temporarily expose input value. Use with caution. get valueInput() { return this._value; } } exports.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedOutputReference = ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedOutputReference; _e = JSII_RTTI_SYMBOL_1; ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedOutputReference[_e] = { fqn: "@cdktf/provider-aws.imagebuilderLifecyclePolicy.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedOutputReference", version: "21.22.1" }; class ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedList 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 ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedList = ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedList; _f = JSII_RTTI_SYMBOL_1; ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedList[_f] = { fqn: "@cdktf/provider-aws.imagebuilderLifecyclePolicy.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedList", version: "21.22.1" }; function imagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisToTerraform(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 { is_public: cdktf.booleanToTerraform(struct.isPublic), regions: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.regions), shared_accounts: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.sharedAccounts), tag_map: cdktf.hashMapper(cdktf.stringToTerraform)(struct.tagMap), last_launched: cdktf.listMapper(imagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedToTerraform, true)(struct.lastLaunched), }; } function imagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisToHclTerraform(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 = { is_public: { value: cdktf.booleanToHclTerraform(struct.isPublic), isBlock: false, type: "simple", storageClassType: "boolean", }, regions: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.regions), isBlock: false, type: "list", storageClassType: "stringList", }, shared_accounts: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.sharedAccounts), isBlock: false, type: "list", storageClassType: "stringList", }, tag_map: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.tagMap), isBlock: false, type: "map", storageClassType: "stringMap", }, last_launched: { value: cdktf.listMapperHcl(imagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedToHclTerraform, true)(struct.lastLaunched), isBlock: true, type: "list", storageClassType: "ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisOutputReference 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; // last_launched - computed: false, optional: true, required: false this._lastLaunched = new ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisLastLaunchedList(this, "last_launched", false); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._isPublic !== undefined) { hasAnyValues = true; internalValueResult.isPublic = this._isPublic; } if (this._regions !== undefined) { hasAnyValues = true; internalValueResult.regions = this._regions; } if (this._sharedAccounts !== undefined) { hasAnyValues = true; internalValueResult.sharedAccounts = this._sharedAccounts; } if (this._tagMap !== undefined) { hasAnyValues = true; internalValueResult.tagMap = this._tagMap; } if (this._lastLaunched?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.lastLaunched = this._lastLaunched?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._isPublic = undefined; this._regions = undefined; this._sharedAccounts = undefined; this._tagMap = undefined; this._lastLaunched.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._isPublic = value.isPublic; this._regions = value.regions; this._sharedAccounts = value.sharedAccounts; this._tagMap = value.tagMap; this._lastLaunched.internalValue = value.lastLaunched; } } get isPublic() { return this.getBooleanAttribute('is_public'); } set isPublic(value) { this._isPublic = value; } resetIsPublic() { this._isPublic = undefined; } // Temporarily expose input value. Use with caution. get isPublicInput() { return this._isPublic; } get regions() { return this.getListAttribute('regions'); } set regions(value) { this._regions = value; } resetRegions() { this._regions = undefined; } // Temporarily expose input value. Use with caution. get regionsInput() { return this._regions; } get sharedAccounts() { return this.getListAttribute('shared_accounts'); } set sharedAccounts(value) { this._sharedAccounts = value; } resetSharedAccounts() { this._sharedAccounts = undefined; } // Temporarily expose input value. Use with caution. get sharedAccountsInput() { return this._sharedAccounts; } get tagMap() { return this.getStringMapAttribute('tag_map'); } set tagMap(value) { this._tagMap = value; } resetTagMap() { this._tagMap = undefined; } // Temporarily expose input value. Use with caution. get tagMapInput() { return this._tagMap; } get lastLaunched() { return this._lastLaunched; } putLastLaunched(value) { this._lastLaunched.internalValue = value; } resetLastLaunched() { this._lastLaunched.internalValue = undefined; } // Temporarily expose input value. Use with caution. get lastLaunchedInput() { return this._lastLaunched.internalValue; } } exports.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisOutputReference = ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisOutputReference; _g = JSII_RTTI_SYMBOL_1; ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisOutputReference[_g] = { fqn: "@cdktf/provider-aws.imagebuilderLifecyclePolicy.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisOutputReference", version: "21.22.1" }; class ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisList 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 ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisList = ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisList; _h = JSII_RTTI_SYMBOL_1; ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisList[_h] = { fqn: "@cdktf/provider-aws.imagebuilderLifecyclePolicy.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisList", version: "21.22.1" }; function imagebuilderLifecyclePolicyPolicyDetailExclusionRulesToTerraform(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 { tag_map: cdktf.hashMapper(cdktf.stringToTerraform)(struct.tagMap), amis: cdktf.listMapper(imagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisToTerraform, true)(struct.amis), }; } function imagebuilderLifecyclePolicyPolicyDetailExclusionRulesToHclTerraform(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 = { tag_map: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.tagMap), isBlock: false, type: "map", storageClassType: "stringMap", }, amis: { value: cdktf.listMapperHcl(imagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisToHclTerraform, true)(struct.amis), isBlock: true, type: "list", storageClassType: "ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesOutputReference 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: false, optional: true, required: false this._amis = new ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesAmisList(this, "amis", false); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._tagMap !== undefined) { hasAnyValues = true; internalValueResult.tagMap = this._tagMap; } if (this._amis?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.amis = this._amis?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._tagMap = undefined; this._amis.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._tagMap = value.tagMap; this._amis.internalValue = value.amis; } } get tagMap() { return this.getStringMapAttribute('tag_map'); } set tagMap(value) { this._tagMap = value; } resetTagMap() { this._tagMap = undefined; } // Temporarily expose input value. Use with caution. get tagMapInput() { return this._tagMap; } get amis() { return this._amis; } putAmis(value) { this._amis.internalValue = value; } resetAmis() { this._amis.internalValue = undefined; } // Temporarily expose input value. Use with caution. get amisInput() { return this._amis.internalValue; } } exports.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesOutputReference = ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesOutputReference; _j = JSII_RTTI_SYMBOL_1; ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesOutputReference[_j] = { fqn: "@cdktf/provider-aws.imagebuilderLifecyclePolicy.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesOutputReference", version: "21.22.1" }; class ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesList 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 ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesList = ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesList; _k = JSII_RTTI_SYMBOL_1; ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesList[_k] = { fqn: "@cdktf/provider-aws.imagebuilderLifecyclePolicy.ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesList", version: "21.22.1" }; function imagebuilderLifecyclePolicyPolicyDetailFilterToTerraform(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 { retain_at_least: cdktf.numberToTerraform(struct.retainAtLeast), type: cdktf.stringToTerraform(struct.type), unit: cdktf.stringToTerraform(struct.unit), value: cdktf.numberToTerraform(struct.value), }; } function imagebuilderLifecyclePolicyPolicyDetailFilterToHclTerraform(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 = { retain_at_least: { value: cdktf.numberToHclTerraform(struct.retainAtLeast), isBlock: false, type: "simple", storageClassType: "number", }, type: { value: cdktf.stringToHclTerraform(struct.type), isBlock: false, type: "simple", storageClassType: "string", }, unit: { value: cdktf.stringToHclTerraform(struct.unit), isBlock: false, type: "simple", storageClassType: "string", }, value: { value: cdktf.numberToHclTerraform(struct.value), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ImagebuilderLifecyclePolicyPolicyDetailFilterOutputReference 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._retainAtLeast !== undefined) { hasAnyValues = true; internalValueResult.retainAtLeast = this._retainAtLeast; } if (this._type !== undefined) { hasAnyValues = true; internalValueResult.type = this._type; } if (this._unit !== undefined) { hasAnyValues = true; internalValueResult.unit = this._unit; } 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._retainAtLeast = undefined; this._type = undefined; this._unit = 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._retainAtLeast = value.retainAtLeast; this._type = value.type; this._unit = value.unit; this._value = value.value; } } get retainAtLeast() { return this.getNumberAttribute('retain_at_least'); } set retainAtLeast(value) { this._retainAtLeast = value; } resetRetainAtLeast() { this._retainAtLeast = undefined; } // Temporarily expose input value. Use with caution. get retainAtLeastInput() { return this._retainAtLeast; } get type() { return this.getStringAttribute('type'); } set type(value) { this._type = value; } // Temporarily expose input value. Use with caution. get typeInput() { return this._type; } get unit() { return this.getStringAttribute('unit'); } set unit(value) { this._unit = value; } resetUnit() { this._unit = undefined; } // Temporarily expose input value. Use with caution. get unitInput() { return this._unit; } get value() { return this.getNumberAttribute('value'); } set value(value) { this._value = value; } // Temporarily expose input value. Use with caution. get valueInput() { return this._value; } } exports.ImagebuilderLifecyclePolicyPolicyDetailFilterOutputReference = ImagebuilderLifecyclePolicyPolicyDetailFilterOutputReference; _l = JSII_RTTI_SYMBOL_1; ImagebuilderLifecyclePolicyPolicyDetailFilterOutputReference[_l] = { fqn: "@cdktf/provider-aws.imagebuilderLifecyclePolicy.ImagebuilderLifecyclePolicyPolicyDetailFilterOutputReference", version: "21.22.1" }; class ImagebuilderLifecyclePolicyPolicyDetailFilterList 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 ImagebuilderLifecyclePolicyPolicyDetailFilterOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ImagebuilderLifecyclePolicyPolicyDetailFilterList = ImagebuilderLifecyclePolicyPolicyDetailFilterList; _m = JSII_RTTI_SYMBOL_1; ImagebuilderLifecyclePolicyPolicyDetailFilterList[_m] = { fqn: "@cdktf/provider-aws.imagebuilderLifecyclePolicy.ImagebuilderLifecyclePolicyPolicyDetailFilterList", version: "21.22.1" }; function imagebuilderLifecyclePolicyPolicyDetailToTerraform(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 { action: cdktf.listMapper(imagebuilderLifecyclePolicyPolicyDetailActionToTerraform, true)(struct.action), exclusion_rules: cdktf.listMapper(imagebuilderLifecyclePolicyPolicyDetailExclusionRulesToTerraform, true)(struct.exclusionRules), filter: cdktf.listMapper(imagebuilderLifecyclePolicyPolicyDetailFilterToTerraform, true)(struct.filter), }; } function imagebuilderLifecyclePolicyPolicyDetailToHclTerraform(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 = { action: { value: cdktf.listMapperHcl(imagebuilderLifecyclePolicyPolicyDetailActionToHclTerraform, true)(struct.action), isBlock: true, type: "list", storageClassType: "ImagebuilderLifecyclePolicyPolicyDetailActionList", }, exclusion_rules: { value: cdktf.listMapperHcl(imagebuilderLifecyclePolicyPolicyDetailExclusionRulesToHclTerraform, true)(struct.exclusionRules), isBlock: true, type: "list", storageClassType: "ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesList", }, filter: { value: cdktf.listMapperHcl(imagebuilderLifecyclePolicyPolicyDetailFilterToHclTerraform, true)(struct.filter), isBlock: true, type: "list", storageClassType: "ImagebuilderLifecyclePolicyPolicyDetailFilterList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ImagebuilderLifecyclePolicyPolicyDetailOutputReference 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; // action - computed: false, optional: true, required: false this._action = new ImagebuilderLifecyclePolicyPolicyDetailActionList(this, "action", false); // exclusion_rules - computed: false, optional: true, required: false this._exclusionRules = new ImagebuilderLifecyclePolicyPolicyDetailExclusionRulesList(this, "exclusion_rules", false); // filter - computed: false, optional: true, required: false this._filter = new ImagebuilderLifecyclePolicyPolicyDetailFilterList(this, "filter", false); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._action?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.action = this._action?.internalValue; } if (this._exclusionRules?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.exclusionRules = this._exclusionRules?.internalValue; } if (this._filter?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.filter = this._filter?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._action.internalValue = undefined; this._exclusionRules.internalValue = undefined; this._filter.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._action.internalValue = value.action; this._exclusionRules.internalValue = value.exclusionRules; this._filter.internalValue = value.filter; } } get action() { return this._action; } putAction(value) { this._action.internalValue = value; } resetAction() { this._action.internalValue = undefined; } // Temporarily expose input value. Use with caution. get actionInput() { return this._action.internalValue; } get exclusionRules() { return this._exclusionRules; } putExclusionRules(value) {