@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,175 lines • 229 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
Object.defineProperty(exports, "__esModule", { value: true });
exports.LbTargetGroup = exports.LbTargetGroupTargetHealthStateList = exports.LbTargetGroupTargetHealthStateOutputReference = exports.lbTargetGroupTargetHealthStateToHclTerraform = exports.lbTargetGroupTargetHealthStateToTerraform = exports.LbTargetGroupTargetGroupHealthOutputReference = exports.lbTargetGroupTargetGroupHealthToHclTerraform = exports.lbTargetGroupTargetGroupHealthToTerraform = exports.LbTargetGroupTargetGroupHealthUnhealthyStateRoutingOutputReference = exports.lbTargetGroupTargetGroupHealthUnhealthyStateRoutingToHclTerraform = exports.lbTargetGroupTargetGroupHealthUnhealthyStateRoutingToTerraform = exports.LbTargetGroupTargetGroupHealthDnsFailoverOutputReference = exports.lbTargetGroupTargetGroupHealthDnsFailoverToHclTerraform = exports.lbTargetGroupTargetGroupHealthDnsFailoverToTerraform = exports.LbTargetGroupTargetFailoverList = exports.LbTargetGroupTargetFailoverOutputReference = exports.lbTargetGroupTargetFailoverToHclTerraform = exports.lbTargetGroupTargetFailoverToTerraform = exports.LbTargetGroupStickinessOutputReference = exports.lbTargetGroupStickinessToHclTerraform = exports.lbTargetGroupStickinessToTerraform = exports.LbTargetGroupHealthCheckOutputReference = exports.lbTargetGroupHealthCheckToHclTerraform = exports.lbTargetGroupHealthCheckToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function lbTargetGroupHealthCheckToTerraform(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 {
enabled: cdktf.booleanToTerraform(struct.enabled),
healthy_threshold: cdktf.numberToTerraform(struct.healthyThreshold),
interval: cdktf.numberToTerraform(struct.interval),
matcher: cdktf.stringToTerraform(struct.matcher),
path: cdktf.stringToTerraform(struct.path),
port: cdktf.stringToTerraform(struct.port),
protocol: cdktf.stringToTerraform(struct.protocol),
timeout: cdktf.numberToTerraform(struct.timeout),
unhealthy_threshold: cdktf.numberToTerraform(struct.unhealthyThreshold),
};
}
exports.lbTargetGroupHealthCheckToTerraform = lbTargetGroupHealthCheckToTerraform;
function lbTargetGroupHealthCheckToHclTerraform(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 = {
enabled: {
value: cdktf.booleanToHclTerraform(struct.enabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
healthy_threshold: {
value: cdktf.numberToHclTerraform(struct.healthyThreshold),
isBlock: false,
type: "simple",
storageClassType: "number",
},
interval: {
value: cdktf.numberToHclTerraform(struct.interval),
isBlock: false,
type: "simple",
storageClassType: "number",
},
matcher: {
value: cdktf.stringToHclTerraform(struct.matcher),
isBlock: false,
type: "simple",
storageClassType: "string",
},
path: {
value: cdktf.stringToHclTerraform(struct.path),
isBlock: false,
type: "simple",
storageClassType: "string",
},
port: {
value: cdktf.stringToHclTerraform(struct.port),
isBlock: false,
type: "simple",
storageClassType: "string",
},
protocol: {
value: cdktf.stringToHclTerraform(struct.protocol),
isBlock: false,
type: "simple",
storageClassType: "string",
},
timeout: {
value: cdktf.numberToHclTerraform(struct.timeout),
isBlock: false,
type: "simple",
storageClassType: "number",
},
unhealthy_threshold: {
value: cdktf.numberToHclTerraform(struct.unhealthyThreshold),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.lbTargetGroupHealthCheckToHclTerraform = lbTargetGroupHealthCheckToHclTerraform;
class LbTargetGroupHealthCheckOutputReference 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._enabled !== undefined) {
hasAnyValues = true;
internalValueResult.enabled = this._enabled;
}
if (this._healthyThreshold !== undefined) {
hasAnyValues = true;
internalValueResult.healthyThreshold = this._healthyThreshold;
}
if (this._interval !== undefined) {
hasAnyValues = true;
internalValueResult.interval = this._interval;
}
if (this._matcher !== undefined) {
hasAnyValues = true;
internalValueResult.matcher = this._matcher;
}
if (this._path !== undefined) {
hasAnyValues = true;
internalValueResult.path = this._path;
}
if (this._port !== undefined) {
hasAnyValues = true;
internalValueResult.port = this._port;
}
if (this._protocol !== undefined) {
hasAnyValues = true;
internalValueResult.protocol = this._protocol;
}
if (this._timeout !== undefined) {
hasAnyValues = true;
internalValueResult.timeout = this._timeout;
}
if (this._unhealthyThreshold !== undefined) {
hasAnyValues = true;
internalValueResult.unhealthyThreshold = this._unhealthyThreshold;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._enabled = undefined;
this._healthyThreshold = undefined;
this._interval = undefined;
this._matcher = undefined;
this._path = undefined;
this._port = undefined;
this._protocol = undefined;
this._timeout = undefined;
this._unhealthyThreshold = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._enabled = value.enabled;
this._healthyThreshold = value.healthyThreshold;
this._interval = value.interval;
this._matcher = value.matcher;
this._path = value.path;
this._port = value.port;
this._protocol = value.protocol;
this._timeout = value.timeout;
this._unhealthyThreshold = value.unhealthyThreshold;
}
}
get enabled() {
return this.getBooleanAttribute('enabled');
}
set enabled(value) {
this._enabled = value;
}
resetEnabled() {
this._enabled = undefined;
}
// Temporarily expose input value. Use with caution.
get enabledInput() {
return this._enabled;
}
get healthyThreshold() {
return this.getNumberAttribute('healthy_threshold');
}
set healthyThreshold(value) {
this._healthyThreshold = value;
}
resetHealthyThreshold() {
this._healthyThreshold = undefined;
}
// Temporarily expose input value. Use with caution.
get healthyThresholdInput() {
return this._healthyThreshold;
}
get interval() {
return this.getNumberAttribute('interval');
}
set interval(value) {
this._interval = value;
}
resetInterval() {
this._interval = undefined;
}
// Temporarily expose input value. Use with caution.
get intervalInput() {
return this._interval;
}
get matcher() {
return this.getStringAttribute('matcher');
}
set matcher(value) {
this._matcher = value;
}
resetMatcher() {
this._matcher = undefined;
}
// Temporarily expose input value. Use with caution.
get matcherInput() {
return this._matcher;
}
get path() {
return this.getStringAttribute('path');
}
set path(value) {
this._path = value;
}
resetPath() {
this._path = undefined;
}
// Temporarily expose input value. Use with caution.
get pathInput() {
return this._path;
}
get port() {
return this.getStringAttribute('port');
}
set port(value) {
this._port = value;
}
resetPort() {
this._port = undefined;
}
// Temporarily expose input value. Use with caution.
get portInput() {
return this._port;
}
get protocol() {
return this.getStringAttribute('protocol');
}
set protocol(value) {
this._protocol = value;
}
resetProtocol() {
this._protocol = undefined;
}
// Temporarily expose input value. Use with caution.
get protocolInput() {
return this._protocol;
}
get timeout() {
return this.getNumberAttribute('timeout');
}
set timeout(value) {
this._timeout = value;
}
resetTimeout() {
this._timeout = undefined;
}
// Temporarily expose input value. Use with caution.
get timeoutInput() {
return this._timeout;
}
get unhealthyThreshold() {
return this.getNumberAttribute('unhealthy_threshold');
}
set unhealthyThreshold(value) {
this._unhealthyThreshold = value;
}
resetUnhealthyThreshold() {
this._unhealthyThreshold = undefined;
}
// Temporarily expose input value. Use with caution.
get unhealthyThresholdInput() {
return this._unhealthyThreshold;
}
}
exports.LbTargetGroupHealthCheckOutputReference = LbTargetGroupHealthCheckOutputReference;
_a = JSII_RTTI_SYMBOL_1;
LbTargetGroupHealthCheckOutputReference[_a] = { fqn: "@cdktf/provider-aws.lbTargetGroup.LbTargetGroupHealthCheckOutputReference", version: "19.50.0" };
function lbTargetGroupStickinessToTerraform(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 {
cookie_duration: cdktf.numberToTerraform(struct.cookieDuration),
cookie_name: cdktf.stringToTerraform(struct.cookieName),
enabled: cdktf.booleanToTerraform(struct.enabled),
type: cdktf.stringToTerraform(struct.type),
};
}
exports.lbTargetGroupStickinessToTerraform = lbTargetGroupStickinessToTerraform;
function lbTargetGroupStickinessToHclTerraform(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 = {
cookie_duration: {
value: cdktf.numberToHclTerraform(struct.cookieDuration),
isBlock: false,
type: "simple",
storageClassType: "number",
},
cookie_name: {
value: cdktf.stringToHclTerraform(struct.cookieName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
enabled: {
value: cdktf.booleanToHclTerraform(struct.enabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
type: {
value: cdktf.stringToHclTerraform(struct.type),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.lbTargetGroupStickinessToHclTerraform = lbTargetGroupStickinessToHclTerraform;
class LbTargetGroupStickinessOutputReference 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._cookieDuration !== undefined) {
hasAnyValues = true;
internalValueResult.cookieDuration = this._cookieDuration;
}
if (this._cookieName !== undefined) {
hasAnyValues = true;
internalValueResult.cookieName = this._cookieName;
}
if (this._enabled !== undefined) {
hasAnyValues = true;
internalValueResult.enabled = this._enabled;
}
if (this._type !== undefined) {
hasAnyValues = true;
internalValueResult.type = this._type;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._cookieDuration = undefined;
this._cookieName = undefined;
this._enabled = undefined;
this._type = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._cookieDuration = value.cookieDuration;
this._cookieName = value.cookieName;
this._enabled = value.enabled;
this._type = value.type;
}
}
get cookieDuration() {
return this.getNumberAttribute('cookie_duration');
}
set cookieDuration(value) {
this._cookieDuration = value;
}
resetCookieDuration() {
this._cookieDuration = undefined;
}
// Temporarily expose input value. Use with caution.
get cookieDurationInput() {
return this._cookieDuration;
}
get cookieName() {
return this.getStringAttribute('cookie_name');
}
set cookieName(value) {
this._cookieName = value;
}
resetCookieName() {
this._cookieName = undefined;
}
// Temporarily expose input value. Use with caution.
get cookieNameInput() {
return this._cookieName;
}
get enabled() {
return this.getBooleanAttribute('enabled');
}
set enabled(value) {
this._enabled = value;
}
resetEnabled() {
this._enabled = undefined;
}
// Temporarily expose input value. Use with caution.
get enabledInput() {
return this._enabled;
}
get type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
}
exports.LbTargetGroupStickinessOutputReference = LbTargetGroupStickinessOutputReference;
_b = JSII_RTTI_SYMBOL_1;
LbTargetGroupStickinessOutputReference[_b] = { fqn: "@cdktf/provider-aws.lbTargetGroup.LbTargetGroupStickinessOutputReference", version: "19.50.0" };
function lbTargetGroupTargetFailoverToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
on_deregistration: cdktf.stringToTerraform(struct.onDeregistration),
on_unhealthy: cdktf.stringToTerraform(struct.onUnhealthy),
};
}
exports.lbTargetGroupTargetFailoverToTerraform = lbTargetGroupTargetFailoverToTerraform;
function lbTargetGroupTargetFailoverToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
on_deregistration: {
value: cdktf.stringToHclTerraform(struct.onDeregistration),
isBlock: false,
type: "simple",
storageClassType: "string",
},
on_unhealthy: {
value: cdktf.stringToHclTerraform(struct.onUnhealthy),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.lbTargetGroupTargetFailoverToHclTerraform = lbTargetGroupTargetFailoverToHclTerraform;
class LbTargetGroupTargetFailoverOutputReference 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._onDeregistration !== undefined) {
hasAnyValues = true;
internalValueResult.onDeregistration = this._onDeregistration;
}
if (this._onUnhealthy !== undefined) {
hasAnyValues = true;
internalValueResult.onUnhealthy = this._onUnhealthy;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._onDeregistration = undefined;
this._onUnhealthy = 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._onDeregistration = value.onDeregistration;
this._onUnhealthy = value.onUnhealthy;
}
}
get onDeregistration() {
return this.getStringAttribute('on_deregistration');
}
set onDeregistration(value) {
this._onDeregistration = value;
}
// Temporarily expose input value. Use with caution.
get onDeregistrationInput() {
return this._onDeregistration;
}
get onUnhealthy() {
return this.getStringAttribute('on_unhealthy');
}
set onUnhealthy(value) {
this._onUnhealthy = value;
}
// Temporarily expose input value. Use with caution.
get onUnhealthyInput() {
return this._onUnhealthy;
}
}
exports.LbTargetGroupTargetFailoverOutputReference = LbTargetGroupTargetFailoverOutputReference;
_c = JSII_RTTI_SYMBOL_1;
LbTargetGroupTargetFailoverOutputReference[_c] = { fqn: "@cdktf/provider-aws.lbTargetGroup.LbTargetGroupTargetFailoverOutputReference", version: "19.50.0" };
class LbTargetGroupTargetFailoverList 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 LbTargetGroupTargetFailoverOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.LbTargetGroupTargetFailoverList = LbTargetGroupTargetFailoverList;
_d = JSII_RTTI_SYMBOL_1;
LbTargetGroupTargetFailoverList[_d] = { fqn: "@cdktf/provider-aws.lbTargetGroup.LbTargetGroupTargetFailoverList", version: "19.50.0" };
function lbTargetGroupTargetGroupHealthDnsFailoverToTerraform(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 {
minimum_healthy_targets_count: cdktf.stringToTerraform(struct.minimumHealthyTargetsCount),
minimum_healthy_targets_percentage: cdktf.stringToTerraform(struct.minimumHealthyTargetsPercentage),
};
}
exports.lbTargetGroupTargetGroupHealthDnsFailoverToTerraform = lbTargetGroupTargetGroupHealthDnsFailoverToTerraform;
function lbTargetGroupTargetGroupHealthDnsFailoverToHclTerraform(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 = {
minimum_healthy_targets_count: {
value: cdktf.stringToHclTerraform(struct.minimumHealthyTargetsCount),
isBlock: false,
type: "simple",
storageClassType: "string",
},
minimum_healthy_targets_percentage: {
value: cdktf.stringToHclTerraform(struct.minimumHealthyTargetsPercentage),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.lbTargetGroupTargetGroupHealthDnsFailoverToHclTerraform = lbTargetGroupTargetGroupHealthDnsFailoverToHclTerraform;
class LbTargetGroupTargetGroupHealthDnsFailoverOutputReference 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._minimumHealthyTargetsCount !== undefined) {
hasAnyValues = true;
internalValueResult.minimumHealthyTargetsCount = this._minimumHealthyTargetsCount;
}
if (this._minimumHealthyTargetsPercentage !== undefined) {
hasAnyValues = true;
internalValueResult.minimumHealthyTargetsPercentage = this._minimumHealthyTargetsPercentage;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._minimumHealthyTargetsCount = undefined;
this._minimumHealthyTargetsPercentage = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._minimumHealthyTargetsCount = value.minimumHealthyTargetsCount;
this._minimumHealthyTargetsPercentage = value.minimumHealthyTargetsPercentage;
}
}
get minimumHealthyTargetsCount() {
return this.getStringAttribute('minimum_healthy_targets_count');
}
set minimumHealthyTargetsCount(value) {
this._minimumHealthyTargetsCount = value;
}
resetMinimumHealthyTargetsCount() {
this._minimumHealthyTargetsCount = undefined;
}
// Temporarily expose input value. Use with caution.
get minimumHealthyTargetsCountInput() {
return this._minimumHealthyTargetsCount;
}
get minimumHealthyTargetsPercentage() {
return this.getStringAttribute('minimum_healthy_targets_percentage');
}
set minimumHealthyTargetsPercentage(value) {
this._minimumHealthyTargetsPercentage = value;
}
resetMinimumHealthyTargetsPercentage() {
this._minimumHealthyTargetsPercentage = undefined;
}
// Temporarily expose input value. Use with caution.
get minimumHealthyTargetsPercentageInput() {
return this._minimumHealthyTargetsPercentage;
}
}
exports.LbTargetGroupTargetGroupHealthDnsFailoverOutputReference = LbTargetGroupTargetGroupHealthDnsFailoverOutputReference;
_e = JSII_RTTI_SYMBOL_1;
LbTargetGroupTargetGroupHealthDnsFailoverOutputReference[_e] = { fqn: "@cdktf/provider-aws.lbTargetGroup.LbTargetGroupTargetGroupHealthDnsFailoverOutputReference", version: "19.50.0" };
function lbTargetGroupTargetGroupHealthUnhealthyStateRoutingToTerraform(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 {
minimum_healthy_targets_count: cdktf.numberToTerraform(struct.minimumHealthyTargetsCount),
minimum_healthy_targets_percentage: cdktf.stringToTerraform(struct.minimumHealthyTargetsPercentage),
};
}
exports.lbTargetGroupTargetGroupHealthUnhealthyStateRoutingToTerraform = lbTargetGroupTargetGroupHealthUnhealthyStateRoutingToTerraform;
function lbTargetGroupTargetGroupHealthUnhealthyStateRoutingToHclTerraform(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 = {
minimum_healthy_targets_count: {
value: cdktf.numberToHclTerraform(struct.minimumHealthyTargetsCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
minimum_healthy_targets_percentage: {
value: cdktf.stringToHclTerraform(struct.minimumHealthyTargetsPercentage),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.lbTargetGroupTargetGroupHealthUnhealthyStateRoutingToHclTerraform = lbTargetGroupTargetGroupHealthUnhealthyStateRoutingToHclTerraform;
class LbTargetGroupTargetGroupHealthUnhealthyStateRoutingOutputReference 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._minimumHealthyTargetsCount !== undefined) {
hasAnyValues = true;
internalValueResult.minimumHealthyTargetsCount = this._minimumHealthyTargetsCount;
}
if (this._minimumHealthyTargetsPercentage !== undefined) {
hasAnyValues = true;
internalValueResult.minimumHealthyTargetsPercentage = this._minimumHealthyTargetsPercentage;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._minimumHealthyTargetsCount = undefined;
this._minimumHealthyTargetsPercentage = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._minimumHealthyTargetsCount = value.minimumHealthyTargetsCount;
this._minimumHealthyTargetsPercentage = value.minimumHealthyTargetsPercentage;
}
}
get minimumHealthyTargetsCount() {
return this.getNumberAttribute('minimum_healthy_targets_count');
}
set minimumHealthyTargetsCount(value) {
this._minimumHealthyTargetsCount = value;
}
resetMinimumHealthyTargetsCount() {
this._minimumHealthyTargetsCount = undefined;
}
// Temporarily expose input value. Use with caution.
get minimumHealthyTargetsCountInput() {
return this._minimumHealthyTargetsCount;
}
get minimumHealthyTargetsPercentage() {
return this.getStringAttribute('minimum_healthy_targets_percentage');
}
set minimumHealthyTargetsPercentage(value) {
this._minimumHealthyTargetsPercentage = value;
}
resetMinimumHealthyTargetsPercentage() {
this._minimumHealthyTargetsPercentage = undefined;
}
// Temporarily expose input value. Use with caution.
get minimumHealthyTargetsPercentageInput() {
return this._minimumHealthyTargetsPercentage;
}
}
exports.LbTargetGroupTargetGroupHealthUnhealthyStateRoutingOutputReference = LbTargetGroupTargetGroupHealthUnhealthyStateRoutingOutputReference;
_f = JSII_RTTI_SYMBOL_1;
LbTargetGroupTargetGroupHealthUnhealthyStateRoutingOutputReference[_f] = { fqn: "@cdktf/provider-aws.lbTargetGroup.LbTargetGroupTargetGroupHealthUnhealthyStateRoutingOutputReference", version: "19.50.0" };
function lbTargetGroupTargetGroupHealthToTerraform(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 {
dns_failover: lbTargetGroupTargetGroupHealthDnsFailoverToTerraform(struct.dnsFailover),
unhealthy_state_routing: lbTargetGroupTargetGroupHealthUnhealthyStateRoutingToTerraform(struct.unhealthyStateRouting),
};
}
exports.lbTargetGroupTargetGroupHealthToTerraform = lbTargetGroupTargetGroupHealthToTerraform;
function lbTargetGroupTargetGroupHealthToHclTerraform(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 = {
dns_failover: {
value: lbTargetGroupTargetGroupHealthDnsFailoverToHclTerraform(struct.dnsFailover),
isBlock: true,
type: "list",
storageClassType: "LbTargetGroupTargetGroupHealthDnsFailoverList",
},
unhealthy_state_routing: {
value: lbTargetGroupTargetGroupHealthUnhealthyStateRoutingToHclTerraform(struct.unhealthyStateRouting),
isBlock: true,
type: "list",
storageClassType: "LbTargetGroupTargetGroupHealthUnhealthyStateRoutingList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.lbTargetGroupTargetGroupHealthToHclTerraform = lbTargetGroupTargetGroupHealthToHclTerraform;
class LbTargetGroupTargetGroupHealthOutputReference 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;
// dns_failover - computed: false, optional: true, required: false
this._dnsFailover = new LbTargetGroupTargetGroupHealthDnsFailoverOutputReference(this, "dns_failover");
// unhealthy_state_routing - computed: false, optional: true, required: false
this._unhealthyStateRouting = new LbTargetGroupTargetGroupHealthUnhealthyStateRoutingOutputReference(this, "unhealthy_state_routing");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._dnsFailover?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.dnsFailover = this._dnsFailover?.internalValue;
}
if (this._unhealthyStateRouting?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.unhealthyStateRouting = this._unhealthyStateRouting?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._dnsFailover.internalValue = undefined;
this._unhealthyStateRouting.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._dnsFailover.internalValue = value.dnsFailover;
this._unhealthyStateRouting.internalValue = value.unhealthyStateRouting;
}
}
get dnsFailover() {
return this._dnsFailover;
}
putDnsFailover(value) {
this._dnsFailover.internalValue = value;
}
resetDnsFailover() {
this._dnsFailover.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get dnsFailoverInput() {
return this._dnsFailover.internalValue;
}
get unhealthyStateRouting() {
return this._unhealthyStateRouting;
}
putUnhealthyStateRouting(value) {
this._unhealthyStateRouting.internalValue = value;
}
resetUnhealthyStateRouting() {
this._unhealthyStateRouting.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get unhealthyStateRoutingInput() {
return this._unhealthyStateRouting.internalValue;
}
}
exports.LbTargetGroupTargetGroupHealthOutputReference = LbTargetGroupTargetGroupHealthOutputReference;
_g = JSII_RTTI_SYMBOL_1;
LbTargetGroupTargetGroupHealthOutputReference[_g] = { fqn: "@cdktf/provider-aws.lbTargetGroup.LbTargetGroupTargetGroupHealthOutputReference", version: "19.50.0" };
function lbTargetGroupTargetHealthStateToTerraform(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 {
enable_unhealthy_connection_termination: cdktf.booleanToTerraform(struct.enableUnhealthyConnectionTermination),
unhealthy_draining_interval: cdktf.numberToTerraform(struct.unhealthyDrainingInterval),
};
}
exports.lbTargetGroupTargetHealthStateToTerraform = lbTargetGroupTargetHealthStateToTerraform;
function lbTargetGroupTargetHealthStateToHclTerraform(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 = {
enable_unhealthy_connection_termination: {
value: cdktf.booleanToHclTerraform(struct.enableUnhealthyConnectionTermination),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
unhealthy_draining_interval: {
value: cdktf.numberToHclTerraform(struct.unhealthyDrainingInterval),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.lbTargetGroupTargetHealthStateToHclTerraform = lbTargetGroupTargetHealthStateToHclTerraform;
class LbTargetGroupTargetHealthStateOutputReference 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._enableUnhealthyConnectionTermination !== undefined) {
hasAnyValues = true;
internalValueResult.enableUnhealthyConnectionTermination = this._enableUnhealthyConnectionTermination;
}
if (this._unhealthyDrainingInterval !== undefined) {
hasAnyValues = true;
internalValueResult.unhealthyDrainingInterval = this._unhealthyDrainingInterval;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._enableUnhealthyConnectionTermination = undefined;
this._unhealthyDrainingInterval = 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._enableUnhealthyConnectionTermination = value.enableUnhealthyConnectionTermination;
this._unhealthyDrainingInterval = value.unhealthyDrainingInterval;
}
}
get enableUnhealthyConnectionTermination() {
return this.getBooleanAttribute('enable_unhealthy_connection_termination');
}
set enableUnhealthyConnectionTermination(value) {
this._enableUnhealthyConnectionTermination = value;
}
// Temporarily expose input value. Use with caution.
get enableUnhealthyConnectionTerminationInput() {
return this._enableUnhealthyConnectionTermination;
}
get unhealthyDrainingInterval() {
return this.getNumberAttribute('unhealthy_draining_interval');
}
set unhealthyDrainingInterval(value) {
this._unhealthyDrainingInterval = value;
}
resetUnhealthyDrainingInterval() {
this._unhealthyDrainingInterval = undefined;
}
// Temporarily expose input value. Use with caution.
get unhealthyDrainingIntervalInput() {
return this._unhealthyDrainingInterval;
}
}
exports.LbTargetGroupTargetHealthStateOutputReference = LbTargetGroupTargetHealthStateOutputReference;
_h = JSII_RTTI_SYMBOL_1;
LbTargetGroupTargetHealthStateOutputReference[_h] = { fqn: "@cdktf/provider-aws.lbTargetGroup.LbTargetGroupTargetHealthStateOutputReference", version: "19.50.0" };
class LbTargetGroupTargetHealthStateList 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 LbTargetGroupTargetHealthStateOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.LbTargetGroupTargetHealthStateList = LbTargetGroupTargetHealthStateList;
_j = JSII_RTTI_SYMBOL_1;
LbTargetGroupTargetHealthStateList[_j] = { fqn: "@cdktf/provider-aws.lbTargetGroup.LbTargetGroupTargetHealthStateList", version: "19.50.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/lb_target_group aws_lb_target_group}
*/
class LbTargetGroup extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a LbTargetGroup 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 LbTargetGroup to import
* @param importFromId The id of the existing LbTargetGroup that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/lb_target_group#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the LbTargetGroup to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_lb_target_group", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/lb_target_group aws_lb_target_group} 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 LbTargetGroupConfig = {}
*/
constructor(scope, id, config = {}) {
super(scope, id, {
terraformResourceType: 'aws_lb_target_group',
terraformGeneratorMetadata: {
providerName: 'aws',
providerVersion: '5.84.0',
providerVersionConstraint: '~> 5.0'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// health_check - computed: false, optional: true, required: false
this._healthCheck = new LbTargetGroupHealthCheckOutputReference(this, "health_check");
// stickiness - computed: false, optional: true, required: false
this._stickiness = new LbTargetGroupStickinessOutputReference(this, "stickiness");
// target_failover - computed: false, optional: true, required: false
this._targetFailover = new LbTargetGroupTargetFailoverList(this, "target_failover", false);
// target_group_health - computed: false, optional: true, required: false
this._targetGroupHealth = new LbTargetGroupTargetGroupHealthOutputReference(this, "target_group_health");
// target_health_state - computed: false, optional: true, required: false
this._targetHealthState = new LbTargetGroupTargetHealthStateList(this, "target_health_state", false);
this._connectionTermination = config.connectionTermination;
this._deregistrationDelay = config.deregistrationDelay;
this._id = config.id;
this._ipAddressType = config.ipAddressType;
this._lambdaMultiValueHeadersEnabled = config.lambdaMultiValueHeadersEnabled;
this._loadBalancingAlgorithmType = config.loadBalancingAlgorithmType;
this._loadBalancingAnomalyMitigation = config.loadBalancingAnomalyMitigation;
this._loadBalancingCrossZoneEnabled = config.loadBalancingCrossZoneEnabled;
this._name = config.name;
this._namePrefix = config.namePrefix;
this._port = config.port;
this._preserveClientIp = config.preserveClientIp;
this._protocol = config.protocol;
this._protocolVersion = config.protocolVersion;
this._proxyProtocolV2 = config.proxyProtocolV2;
this._slowStart = config.slowStart;
this._tags = config.tags;
this._tagsAll = config.tagsAll;
this._targetType = config.targetType;
this._vpcId = config.vpcId;
this._healthCheck.internalValue = config.healthCheck;
this._stickiness.internalValue = config.stickiness;
this._targetFailover.internalValue = config.targetFailover;
this._targetGroupHealth.internalValue = config.targetGroupHealth;
this._targetHealthState.internalValue = config.targetHealthState;
}
// ==========
// ATTRIBUTES
// ==========
// arn - computed: true, optional: false, required: false
get arn() {
return this.getStringAttribute('arn');
}
// arn_suffix - computed: true, optional: false, required: false
get arnSuffix() {
return this.getStringAttribute('arn_suffix');
}
get connectionTermination() {
return this.getBooleanAttribute('connection_termination');
}
set connectionTermination(value) {
this._connectionTermination = value;
}
resetConnectionTermination() {
this._connectionTermination = undefined;
}
// Temporarily expose input value. Use with caution.
get connectionTerminationInput() {
return this._connectionTermination;
}
get deregistrationDelay() {
return this.getStringAttribute('deregistration_delay');
}
set deregistrationDelay(value) {
this._deregistrationDelay = value;
}
resetDeregistrationDelay() {
this._deregistrationDelay = undefined;
}
// Temporarily expose input value. Use with caution.
get deregistrationDelayInput() {
return this._deregistrationDelay;
}
get id() {
return this.getStringAttribute('id');
}
set id(value) {
this._id = value;
}
resetId() {
this._id = undefined;
}
// Temporarily expose input value. Use with caution.
get idInput() {
return this._id;
}
get ipAddressType() {
return this.getStringAttribute('ip_address_type');
}
set ipAddressType(value) {
this._ipAddressType = value;
}
resetIpAddressType() {
this._ipAddressType = undefined;
}
// Temporarily expose input value. Use with caution.
get ipAddressTypeInput() {
return this._ipAddressType;
}
get lambdaMultiValueHeadersEnabled() {
return this.getBooleanAttribute('lambda_multi_value_headers_enabled');
}
set lambdaMultiValueHeadersEnabled(value) {
this._lambdaMultiValueHeadersEnabled = value;
}
resetLambdaMultiValueHeadersEnabled() {
this._lambdaMultiValueHeadersEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get lambdaMultiValueHeadersEnabledInput() {
return this._lambdaMultiValueHeadersEnabled;
}
// load_balancer_arns - computed: true, optional: false, required: false
get loadBalancerArns() {
return cdktf.Fn.tolist(this.getListAttribute('load_balancer_arns'));
}
get loadBalancingAlgorithmType() {
return this.getStringAttribute('load_balancing_algorithm_type');
}
set loadBalancingAlgorithmType(v