UNPKG

@cdktf/provider-aws

Version:

Prebuilt aws Provider for Terraform CDK (cdktf)

1,168 lines 216 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; Object.defineProperty(exports, "__esModule", { value: true }); exports.LightsailDistribution = exports.LightsailDistributionTimeoutsOutputReference = exports.LightsailDistributionOriginOutputReference = exports.LightsailDistributionDefaultCacheBehaviorOutputReference = exports.LightsailDistributionCacheBehaviorSettingsOutputReference = exports.LightsailDistributionCacheBehaviorSettingsForwardedQueryStringsOutputReference = exports.LightsailDistributionCacheBehaviorSettingsForwardedHeadersOutputReference = exports.LightsailDistributionCacheBehaviorSettingsForwardedCookiesOutputReference = exports.LightsailDistributionCacheBehaviorList = exports.LightsailDistributionCacheBehaviorOutputReference = exports.LightsailDistributionLocationList = exports.LightsailDistributionLocationOutputReference = void 0; exports.lightsailDistributionLocationToTerraform = lightsailDistributionLocationToTerraform; exports.lightsailDistributionLocationToHclTerraform = lightsailDistributionLocationToHclTerraform; exports.lightsailDistributionCacheBehaviorToTerraform = lightsailDistributionCacheBehaviorToTerraform; exports.lightsailDistributionCacheBehaviorToHclTerraform = lightsailDistributionCacheBehaviorToHclTerraform; exports.lightsailDistributionCacheBehaviorSettingsForwardedCookiesToTerraform = lightsailDistributionCacheBehaviorSettingsForwardedCookiesToTerraform; exports.lightsailDistributionCacheBehaviorSettingsForwardedCookiesToHclTerraform = lightsailDistributionCacheBehaviorSettingsForwardedCookiesToHclTerraform; exports.lightsailDistributionCacheBehaviorSettingsForwardedHeadersToTerraform = lightsailDistributionCacheBehaviorSettingsForwardedHeadersToTerraform; exports.lightsailDistributionCacheBehaviorSettingsForwardedHeadersToHclTerraform = lightsailDistributionCacheBehaviorSettingsForwardedHeadersToHclTerraform; exports.lightsailDistributionCacheBehaviorSettingsForwardedQueryStringsToTerraform = lightsailDistributionCacheBehaviorSettingsForwardedQueryStringsToTerraform; exports.lightsailDistributionCacheBehaviorSettingsForwardedQueryStringsToHclTerraform = lightsailDistributionCacheBehaviorSettingsForwardedQueryStringsToHclTerraform; exports.lightsailDistributionCacheBehaviorSettingsToTerraform = lightsailDistributionCacheBehaviorSettingsToTerraform; exports.lightsailDistributionCacheBehaviorSettingsToHclTerraform = lightsailDistributionCacheBehaviorSettingsToHclTerraform; exports.lightsailDistributionDefaultCacheBehaviorToTerraform = lightsailDistributionDefaultCacheBehaviorToTerraform; exports.lightsailDistributionDefaultCacheBehaviorToHclTerraform = lightsailDistributionDefaultCacheBehaviorToHclTerraform; exports.lightsailDistributionOriginToTerraform = lightsailDistributionOriginToTerraform; exports.lightsailDistributionOriginToHclTerraform = lightsailDistributionOriginToHclTerraform; exports.lightsailDistributionTimeoutsToTerraform = lightsailDistributionTimeoutsToTerraform; exports.lightsailDistributionTimeoutsToHclTerraform = lightsailDistributionTimeoutsToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function lightsailDistributionLocationToTerraform(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 lightsailDistributionLocationToHclTerraform(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 LightsailDistributionLocationOutputReference 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; } } // availability_zone - computed: true, optional: false, required: false get availabilityZone() { return this.getStringAttribute('availability_zone'); } // region_name - computed: true, optional: false, required: false get regionName() { return this.getStringAttribute('region_name'); } } exports.LightsailDistributionLocationOutputReference = LightsailDistributionLocationOutputReference; _a = JSII_RTTI_SYMBOL_1; LightsailDistributionLocationOutputReference[_a] = { fqn: "@cdktf/provider-aws.lightsailDistribution.LightsailDistributionLocationOutputReference", version: "21.22.1" }; class LightsailDistributionLocationList 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 LightsailDistributionLocationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.LightsailDistributionLocationList = LightsailDistributionLocationList; _b = JSII_RTTI_SYMBOL_1; LightsailDistributionLocationList[_b] = { fqn: "@cdktf/provider-aws.lightsailDistribution.LightsailDistributionLocationList", version: "21.22.1" }; function lightsailDistributionCacheBehaviorToTerraform(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 { behavior: cdktf.stringToTerraform(struct.behavior), path: cdktf.stringToTerraform(struct.path), }; } function lightsailDistributionCacheBehaviorToHclTerraform(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 = { behavior: { value: cdktf.stringToHclTerraform(struct.behavior), isBlock: false, type: "simple", storageClassType: "string", }, path: { value: cdktf.stringToHclTerraform(struct.path), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class LightsailDistributionCacheBehaviorOutputReference 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._behavior !== undefined) { hasAnyValues = true; internalValueResult.behavior = this._behavior; } if (this._path !== undefined) { hasAnyValues = true; internalValueResult.path = this._path; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._behavior = undefined; this._path = 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._behavior = value.behavior; this._path = value.path; } } get behavior() { return this.getStringAttribute('behavior'); } set behavior(value) { this._behavior = value; } // Temporarily expose input value. Use with caution. get behaviorInput() { return this._behavior; } get path() { return this.getStringAttribute('path'); } set path(value) { this._path = value; } // Temporarily expose input value. Use with caution. get pathInput() { return this._path; } } exports.LightsailDistributionCacheBehaviorOutputReference = LightsailDistributionCacheBehaviorOutputReference; _c = JSII_RTTI_SYMBOL_1; LightsailDistributionCacheBehaviorOutputReference[_c] = { fqn: "@cdktf/provider-aws.lightsailDistribution.LightsailDistributionCacheBehaviorOutputReference", version: "21.22.1" }; class LightsailDistributionCacheBehaviorList 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 LightsailDistributionCacheBehaviorOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.LightsailDistributionCacheBehaviorList = LightsailDistributionCacheBehaviorList; _d = JSII_RTTI_SYMBOL_1; LightsailDistributionCacheBehaviorList[_d] = { fqn: "@cdktf/provider-aws.lightsailDistribution.LightsailDistributionCacheBehaviorList", version: "21.22.1" }; function lightsailDistributionCacheBehaviorSettingsForwardedCookiesToTerraform(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 { cookies_allow_list: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.cookiesAllowList), option: cdktf.stringToTerraform(struct.option), }; } function lightsailDistributionCacheBehaviorSettingsForwardedCookiesToHclTerraform(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 = { cookies_allow_list: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.cookiesAllowList), isBlock: false, type: "set", storageClassType: "stringList", }, option: { value: cdktf.stringToHclTerraform(struct.option), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class LightsailDistributionCacheBehaviorSettingsForwardedCookiesOutputReference 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._cookiesAllowList !== undefined) { hasAnyValues = true; internalValueResult.cookiesAllowList = this._cookiesAllowList; } if (this._option !== undefined) { hasAnyValues = true; internalValueResult.option = this._option; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._cookiesAllowList = undefined; this._option = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._cookiesAllowList = value.cookiesAllowList; this._option = value.option; } } get cookiesAllowList() { return cdktf.Fn.tolist(this.getListAttribute('cookies_allow_list')); } set cookiesAllowList(value) { this._cookiesAllowList = value; } resetCookiesAllowList() { this._cookiesAllowList = undefined; } // Temporarily expose input value. Use with caution. get cookiesAllowListInput() { return this._cookiesAllowList; } get option() { return this.getStringAttribute('option'); } set option(value) { this._option = value; } resetOption() { this._option = undefined; } // Temporarily expose input value. Use with caution. get optionInput() { return this._option; } } exports.LightsailDistributionCacheBehaviorSettingsForwardedCookiesOutputReference = LightsailDistributionCacheBehaviorSettingsForwardedCookiesOutputReference; _e = JSII_RTTI_SYMBOL_1; LightsailDistributionCacheBehaviorSettingsForwardedCookiesOutputReference[_e] = { fqn: "@cdktf/provider-aws.lightsailDistribution.LightsailDistributionCacheBehaviorSettingsForwardedCookiesOutputReference", version: "21.22.1" }; function lightsailDistributionCacheBehaviorSettingsForwardedHeadersToTerraform(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 { headers_allow_list: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.headersAllowList), option: cdktf.stringToTerraform(struct.option), }; } function lightsailDistributionCacheBehaviorSettingsForwardedHeadersToHclTerraform(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 = { headers_allow_list: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.headersAllowList), isBlock: false, type: "set", storageClassType: "stringList", }, option: { value: cdktf.stringToHclTerraform(struct.option), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class LightsailDistributionCacheBehaviorSettingsForwardedHeadersOutputReference 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._headersAllowList !== undefined) { hasAnyValues = true; internalValueResult.headersAllowList = this._headersAllowList; } if (this._option !== undefined) { hasAnyValues = true; internalValueResult.option = this._option; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._headersAllowList = undefined; this._option = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._headersAllowList = value.headersAllowList; this._option = value.option; } } get headersAllowList() { return cdktf.Fn.tolist(this.getListAttribute('headers_allow_list')); } set headersAllowList(value) { this._headersAllowList = value; } resetHeadersAllowList() { this._headersAllowList = undefined; } // Temporarily expose input value. Use with caution. get headersAllowListInput() { return this._headersAllowList; } get option() { return this.getStringAttribute('option'); } set option(value) { this._option = value; } resetOption() { this._option = undefined; } // Temporarily expose input value. Use with caution. get optionInput() { return this._option; } } exports.LightsailDistributionCacheBehaviorSettingsForwardedHeadersOutputReference = LightsailDistributionCacheBehaviorSettingsForwardedHeadersOutputReference; _f = JSII_RTTI_SYMBOL_1; LightsailDistributionCacheBehaviorSettingsForwardedHeadersOutputReference[_f] = { fqn: "@cdktf/provider-aws.lightsailDistribution.LightsailDistributionCacheBehaviorSettingsForwardedHeadersOutputReference", version: "21.22.1" }; function lightsailDistributionCacheBehaviorSettingsForwardedQueryStringsToTerraform(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 { option: cdktf.booleanToTerraform(struct.option), query_strings_allowed_list: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.queryStringsAllowedList), }; } function lightsailDistributionCacheBehaviorSettingsForwardedQueryStringsToHclTerraform(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 = { option: { value: cdktf.booleanToHclTerraform(struct.option), isBlock: false, type: "simple", storageClassType: "boolean", }, query_strings_allowed_list: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.queryStringsAllowedList), isBlock: false, type: "set", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class LightsailDistributionCacheBehaviorSettingsForwardedQueryStringsOutputReference 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._option !== undefined) { hasAnyValues = true; internalValueResult.option = this._option; } if (this._queryStringsAllowedList !== undefined) { hasAnyValues = true; internalValueResult.queryStringsAllowedList = this._queryStringsAllowedList; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._option = undefined; this._queryStringsAllowedList = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._option = value.option; this._queryStringsAllowedList = value.queryStringsAllowedList; } } get option() { return this.getBooleanAttribute('option'); } set option(value) { this._option = value; } resetOption() { this._option = undefined; } // Temporarily expose input value. Use with caution. get optionInput() { return this._option; } get queryStringsAllowedList() { return cdktf.Fn.tolist(this.getListAttribute('query_strings_allowed_list')); } set queryStringsAllowedList(value) { this._queryStringsAllowedList = value; } resetQueryStringsAllowedList() { this._queryStringsAllowedList = undefined; } // Temporarily expose input value. Use with caution. get queryStringsAllowedListInput() { return this._queryStringsAllowedList; } } exports.LightsailDistributionCacheBehaviorSettingsForwardedQueryStringsOutputReference = LightsailDistributionCacheBehaviorSettingsForwardedQueryStringsOutputReference; _g = JSII_RTTI_SYMBOL_1; LightsailDistributionCacheBehaviorSettingsForwardedQueryStringsOutputReference[_g] = { fqn: "@cdktf/provider-aws.lightsailDistribution.LightsailDistributionCacheBehaviorSettingsForwardedQueryStringsOutputReference", version: "21.22.1" }; function lightsailDistributionCacheBehaviorSettingsToTerraform(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 { allowed_http_methods: cdktf.stringToTerraform(struct.allowedHttpMethods), cached_http_methods: cdktf.stringToTerraform(struct.cachedHttpMethods), default_ttl: cdktf.numberToTerraform(struct.defaultTtl), maximum_ttl: cdktf.numberToTerraform(struct.maximumTtl), minimum_ttl: cdktf.numberToTerraform(struct.minimumTtl), forwarded_cookies: lightsailDistributionCacheBehaviorSettingsForwardedCookiesToTerraform(struct.forwardedCookies), forwarded_headers: lightsailDistributionCacheBehaviorSettingsForwardedHeadersToTerraform(struct.forwardedHeaders), forwarded_query_strings: lightsailDistributionCacheBehaviorSettingsForwardedQueryStringsToTerraform(struct.forwardedQueryStrings), }; } function lightsailDistributionCacheBehaviorSettingsToHclTerraform(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 = { allowed_http_methods: { value: cdktf.stringToHclTerraform(struct.allowedHttpMethods), isBlock: false, type: "simple", storageClassType: "string", }, cached_http_methods: { value: cdktf.stringToHclTerraform(struct.cachedHttpMethods), isBlock: false, type: "simple", storageClassType: "string", }, default_ttl: { value: cdktf.numberToHclTerraform(struct.defaultTtl), isBlock: false, type: "simple", storageClassType: "number", }, maximum_ttl: { value: cdktf.numberToHclTerraform(struct.maximumTtl), isBlock: false, type: "simple", storageClassType: "number", }, minimum_ttl: { value: cdktf.numberToHclTerraform(struct.minimumTtl), isBlock: false, type: "simple", storageClassType: "number", }, forwarded_cookies: { value: lightsailDistributionCacheBehaviorSettingsForwardedCookiesToHclTerraform(struct.forwardedCookies), isBlock: true, type: "list", storageClassType: "LightsailDistributionCacheBehaviorSettingsForwardedCookiesList", }, forwarded_headers: { value: lightsailDistributionCacheBehaviorSettingsForwardedHeadersToHclTerraform(struct.forwardedHeaders), isBlock: true, type: "list", storageClassType: "LightsailDistributionCacheBehaviorSettingsForwardedHeadersList", }, forwarded_query_strings: { value: lightsailDistributionCacheBehaviorSettingsForwardedQueryStringsToHclTerraform(struct.forwardedQueryStrings), isBlock: true, type: "list", storageClassType: "LightsailDistributionCacheBehaviorSettingsForwardedQueryStringsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class LightsailDistributionCacheBehaviorSettingsOutputReference 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; // forwarded_cookies - computed: false, optional: true, required: false this._forwardedCookies = new LightsailDistributionCacheBehaviorSettingsForwardedCookiesOutputReference(this, "forwarded_cookies"); // forwarded_headers - computed: false, optional: true, required: false this._forwardedHeaders = new LightsailDistributionCacheBehaviorSettingsForwardedHeadersOutputReference(this, "forwarded_headers"); // forwarded_query_strings - computed: false, optional: true, required: false this._forwardedQueryStrings = new LightsailDistributionCacheBehaviorSettingsForwardedQueryStringsOutputReference(this, "forwarded_query_strings"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._allowedHttpMethods !== undefined) { hasAnyValues = true; internalValueResult.allowedHttpMethods = this._allowedHttpMethods; } if (this._cachedHttpMethods !== undefined) { hasAnyValues = true; internalValueResult.cachedHttpMethods = this._cachedHttpMethods; } if (this._defaultTtl !== undefined) { hasAnyValues = true; internalValueResult.defaultTtl = this._defaultTtl; } if (this._maximumTtl !== undefined) { hasAnyValues = true; internalValueResult.maximumTtl = this._maximumTtl; } if (this._minimumTtl !== undefined) { hasAnyValues = true; internalValueResult.minimumTtl = this._minimumTtl; } if (this._forwardedCookies?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.forwardedCookies = this._forwardedCookies?.internalValue; } if (this._forwardedHeaders?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.forwardedHeaders = this._forwardedHeaders?.internalValue; } if (this._forwardedQueryStrings?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.forwardedQueryStrings = this._forwardedQueryStrings?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._allowedHttpMethods = undefined; this._cachedHttpMethods = undefined; this._defaultTtl = undefined; this._maximumTtl = undefined; this._minimumTtl = undefined; this._forwardedCookies.internalValue = undefined; this._forwardedHeaders.internalValue = undefined; this._forwardedQueryStrings.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._allowedHttpMethods = value.allowedHttpMethods; this._cachedHttpMethods = value.cachedHttpMethods; this._defaultTtl = value.defaultTtl; this._maximumTtl = value.maximumTtl; this._minimumTtl = value.minimumTtl; this._forwardedCookies.internalValue = value.forwardedCookies; this._forwardedHeaders.internalValue = value.forwardedHeaders; this._forwardedQueryStrings.internalValue = value.forwardedQueryStrings; } } get allowedHttpMethods() { return this.getStringAttribute('allowed_http_methods'); } set allowedHttpMethods(value) { this._allowedHttpMethods = value; } resetAllowedHttpMethods() { this._allowedHttpMethods = undefined; } // Temporarily expose input value. Use with caution. get allowedHttpMethodsInput() { return this._allowedHttpMethods; } get cachedHttpMethods() { return this.getStringAttribute('cached_http_methods'); } set cachedHttpMethods(value) { this._cachedHttpMethods = value; } resetCachedHttpMethods() { this._cachedHttpMethods = undefined; } // Temporarily expose input value. Use with caution. get cachedHttpMethodsInput() { return this._cachedHttpMethods; } get defaultTtl() { return this.getNumberAttribute('default_ttl'); } set defaultTtl(value) { this._defaultTtl = value; } resetDefaultTtl() { this._defaultTtl = undefined; } // Temporarily expose input value. Use with caution. get defaultTtlInput() { return this._defaultTtl; } get maximumTtl() { return this.getNumberAttribute('maximum_ttl'); } set maximumTtl(value) { this._maximumTtl = value; } resetMaximumTtl() { this._maximumTtl = undefined; } // Temporarily expose input value. Use with caution. get maximumTtlInput() { return this._maximumTtl; } get minimumTtl() { return this.getNumberAttribute('minimum_ttl'); } set minimumTtl(value) { this._minimumTtl = value; } resetMinimumTtl() { this._minimumTtl = undefined; } // Temporarily expose input value. Use with caution. get minimumTtlInput() { return this._minimumTtl; } get forwardedCookies() { return this._forwardedCookies; } putForwardedCookies(value) { this._forwardedCookies.internalValue = value; } resetForwardedCookies() { this._forwardedCookies.internalValue = undefined; } // Temporarily expose input value. Use with caution. get forwardedCookiesInput() { return this._forwardedCookies.internalValue; } get forwardedHeaders() { return this._forwardedHeaders; } putForwardedHeaders(value) { this._forwardedHeaders.internalValue = value; } resetForwardedHeaders() { this._forwardedHeaders.internalValue = undefined; } // Temporarily expose input value. Use with caution. get forwardedHeadersInput() { return this._forwardedHeaders.internalValue; } get forwardedQueryStrings() { return this._forwardedQueryStrings; } putForwardedQueryStrings(value) { this._forwardedQueryStrings.internalValue = value; } resetForwardedQueryStrings() { this._forwardedQueryStrings.internalValue = undefined; } // Temporarily expose input value. Use with caution. get forwardedQueryStringsInput() { return this._forwardedQueryStrings.internalValue; } } exports.LightsailDistributionCacheBehaviorSettingsOutputReference = LightsailDistributionCacheBehaviorSettingsOutputReference; _h = JSII_RTTI_SYMBOL_1; LightsailDistributionCacheBehaviorSettingsOutputReference[_h] = { fqn: "@cdktf/provider-aws.lightsailDistribution.LightsailDistributionCacheBehaviorSettingsOutputReference", version: "21.22.1" }; function lightsailDistributionDefaultCacheBehaviorToTerraform(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 { behavior: cdktf.stringToTerraform(struct.behavior), }; } function lightsailDistributionDefaultCacheBehaviorToHclTerraform(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 = { behavior: { value: cdktf.stringToHclTerraform(struct.behavior), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class LightsailDistributionDefaultCacheBehaviorOutputReference 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._behavior !== undefined) { hasAnyValues = true; internalValueResult.behavior = this._behavior; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._behavior = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._behavior = value.behavior; } } get behavior() { return this.getStringAttribute('behavior'); } set behavior(value) { this._behavior = value; } // Temporarily expose input value. Use with caution. get behaviorInput() { return this._behavior; } } exports.LightsailDistributionDefaultCacheBehaviorOutputReference = LightsailDistributionDefaultCacheBehaviorOutputReference; _j = JSII_RTTI_SYMBOL_1; LightsailDistributionDefaultCacheBehaviorOutputReference[_j] = { fqn: "@cdktf/provider-aws.lightsailDistribution.LightsailDistributionDefaultCacheBehaviorOutputReference", version: "21.22.1" }; function lightsailDistributionOriginToTerraform(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), protocol_policy: cdktf.stringToTerraform(struct.protocolPolicy), region_name: cdktf.stringToTerraform(struct.regionName), }; } function lightsailDistributionOriginToHclTerraform(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", }, protocol_policy: { value: cdktf.stringToHclTerraform(struct.protocolPolicy), isBlock: false, type: "simple", storageClassType: "string", }, region_name: { value: cdktf.stringToHclTerraform(struct.regionName), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class LightsailDistributionOriginOutputReference 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._name !== undefined) { hasAnyValues = true; internalValueResult.name = this._name; } if (this._protocolPolicy !== undefined) { hasAnyValues = true; internalValueResult.protocolPolicy = this._protocolPolicy; } if (this._regionName !== undefined) { hasAnyValues = true; internalValueResult.regionName = this._regionName; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._name = undefined; this._protocolPolicy = undefined; this._regionName = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._name = value.name; this._protocolPolicy = value.protocolPolicy; this._regionName = value.regionName; } } 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 protocolPolicy() { return this.getStringAttribute('protocol_policy'); } set protocolPolicy(value) { this._protocolPolicy = value; } resetProtocolPolicy() { this._protocolPolicy = undefined; } // Temporarily expose input value. Use with caution. get protocolPolicyInput() { return this._protocolPolicy; } get regionName() { return this.getStringAttribute('region_name'); } set regionName(value) { this._regionName = value; } // Temporarily expose input value. Use with caution. get regionNameInput() { return this._regionName; } // resource_type - computed: true, optional: false, required: false get resourceType() { return this.getStringAttribute('resource_type'); } } exports.LightsailDistributionOriginOutputReference = LightsailDistributionOriginOutputReference; _k = JSII_RTTI_SYMBOL_1; LightsailDistributionOriginOutputReference[_k] = { fqn: "@cdktf/provider-aws.lightsailDistribution.LightsailDistributionOriginOutputReference", version: "21.22.1" }; function lightsailDistributionTimeoutsToTerraform(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), delete: cdktf.stringToTerraform(struct.delete), update: cdktf.stringToTerraform(struct.update), }; } function lightsailDistributionTimeoutsToHclTerraform(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", }, delete: { value: cdktf.stringToHclTerraform(struct.delete), isBlock: false, type: "simple", storageClassType: "string", }, update: { value: cdktf.stringToHclTerraform(struct.update), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class LightsailDistributionTimeoutsOutputReference 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; } if (this._delete !== undefined) { hasAnyValues = true; internalValueResult.delete = this._delete; } if (this._update !== undefined) { hasAnyValues = true; internalValueResult.update = this._update; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._create = undefined; this._delete = undefined; this._update = 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; this._delete = value.delete; this._update = value.update; } } 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; } get delete() { return this.getStringAttribute('delete'); } set delete(value) { this._delete = value; } resetDelete() { this._delete = undefined; } // Temporarily expose input value. Use with caution. get deleteInput() { return this._delete; } get update() { return this.getStringAttribute('update'); } set update(value) { this._update = value; } resetUpdate() { this._update = undefined; } // Temporarily expose input value. Use with caution. get updateInput() { return this._update; } } exports.LightsailDistributionTimeoutsOutputReference = LightsailDistributionTimeoutsOutputReference; _l = JSII_RTTI_SYMBOL_1; LightsailDistributionTimeoutsOutputReference[_l] = { fqn: "@cdktf/provider-aws.lightsailDistribution.LightsailDistributionTimeoutsOutputReference", version: "21.22.1" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/lightsail_distribution aws_lightsail_distribution} */ class LightsailDistribution extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a LightsailDistribution 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 LightsailDistribution to import * @param importFromId The id of the existing LightsailDistribution that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/lightsail_distribution#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the LightsailDistribution to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_lightsail_distribution", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/lightsail_distribution aws_lightsail_distribution} 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 LightsailDistributionConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'aws_lightsail_distribution', 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 }); // location - computed: true, optional: false, required: false this._location = new LightsailDistributionLocationList(this, "location", false); // cache_behavior - computed: false, optional: true, required: false this._cacheBehavior = new LightsailDistributionCacheBehaviorList(this, "cache_behavior", true); // cache_behavior_settings -