@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,039 lines (1,038 loc) • 722 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EcsService = exports.EcsServiceVpcLatticeConfigurationsList = exports.EcsServiceVpcLatticeConfigurationsOutputReference = exports.EcsServiceVolumeConfigurationOutputReference = exports.EcsServiceVolumeConfigurationManagedEbsVolumeOutputReference = exports.EcsServiceVolumeConfigurationManagedEbsVolumeTagSpecificationsList = exports.EcsServiceVolumeConfigurationManagedEbsVolumeTagSpecificationsOutputReference = exports.EcsServiceTimeoutsOutputReference = exports.EcsServiceServiceRegistriesOutputReference = exports.EcsServiceServiceConnectConfigurationOutputReference = exports.EcsServiceServiceConnectConfigurationServiceList = exports.EcsServiceServiceConnectConfigurationServiceOutputReference = exports.EcsServiceServiceConnectConfigurationServiceTlsOutputReference = exports.EcsServiceServiceConnectConfigurationServiceTlsIssuerCertAuthorityOutputReference = exports.EcsServiceServiceConnectConfigurationServiceTimeoutOutputReference = exports.EcsServiceServiceConnectConfigurationServiceClientAliasOutputReference = exports.EcsServiceServiceConnectConfigurationServiceClientAliasTestTrafficRulesList = exports.EcsServiceServiceConnectConfigurationServiceClientAliasTestTrafficRulesOutputReference = exports.EcsServiceServiceConnectConfigurationServiceClientAliasTestTrafficRulesHeaderOutputReference = exports.EcsServiceServiceConnectConfigurationServiceClientAliasTestTrafficRulesHeaderValueOutputReference = exports.EcsServiceServiceConnectConfigurationLogConfigurationOutputReference = exports.EcsServiceServiceConnectConfigurationLogConfigurationSecretOptionList = exports.EcsServiceServiceConnectConfigurationLogConfigurationSecretOptionOutputReference = exports.EcsServicePlacementConstraintsList = exports.EcsServicePlacementConstraintsOutputReference = exports.EcsServiceOrderedPlacementStrategyList = exports.EcsServiceOrderedPlacementStrategyOutputReference = exports.EcsServiceNetworkConfigurationOutputReference = exports.EcsServiceLoadBalancerList = exports.EcsServiceLoadBalancerOutputReference = exports.EcsServiceLoadBalancerAdvancedConfigurationOutputReference = exports.EcsServiceDeploymentControllerOutputReference = exports.EcsServiceDeploymentConfigurationOutputReference = exports.EcsServiceDeploymentConfigurationLinearConfigurationOutputReference = exports.EcsServiceDeploymentConfigurationLifecycleHookList = exports.EcsServiceDeploymentConfigurationLifecycleHookOutputReference = exports.EcsServiceDeploymentConfigurationCanaryConfigurationOutputReference = exports.EcsServiceDeploymentCircuitBreakerOutputReference = exports.EcsServiceCapacityProviderStrategyList = exports.EcsServiceCapacityProviderStrategyOutputReference = exports.EcsServiceAlarmsOutputReference = void 0;
exports.ecsServiceAlarmsToTerraform = ecsServiceAlarmsToTerraform;
exports.ecsServiceAlarmsToHclTerraform = ecsServiceAlarmsToHclTerraform;
exports.ecsServiceCapacityProviderStrategyToTerraform = ecsServiceCapacityProviderStrategyToTerraform;
exports.ecsServiceCapacityProviderStrategyToHclTerraform = ecsServiceCapacityProviderStrategyToHclTerraform;
exports.ecsServiceDeploymentCircuitBreakerToTerraform = ecsServiceDeploymentCircuitBreakerToTerraform;
exports.ecsServiceDeploymentCircuitBreakerToHclTerraform = ecsServiceDeploymentCircuitBreakerToHclTerraform;
exports.ecsServiceDeploymentConfigurationCanaryConfigurationToTerraform = ecsServiceDeploymentConfigurationCanaryConfigurationToTerraform;
exports.ecsServiceDeploymentConfigurationCanaryConfigurationToHclTerraform = ecsServiceDeploymentConfigurationCanaryConfigurationToHclTerraform;
exports.ecsServiceDeploymentConfigurationLifecycleHookToTerraform = ecsServiceDeploymentConfigurationLifecycleHookToTerraform;
exports.ecsServiceDeploymentConfigurationLifecycleHookToHclTerraform = ecsServiceDeploymentConfigurationLifecycleHookToHclTerraform;
exports.ecsServiceDeploymentConfigurationLinearConfigurationToTerraform = ecsServiceDeploymentConfigurationLinearConfigurationToTerraform;
exports.ecsServiceDeploymentConfigurationLinearConfigurationToHclTerraform = ecsServiceDeploymentConfigurationLinearConfigurationToHclTerraform;
exports.ecsServiceDeploymentConfigurationToTerraform = ecsServiceDeploymentConfigurationToTerraform;
exports.ecsServiceDeploymentConfigurationToHclTerraform = ecsServiceDeploymentConfigurationToHclTerraform;
exports.ecsServiceDeploymentControllerToTerraform = ecsServiceDeploymentControllerToTerraform;
exports.ecsServiceDeploymentControllerToHclTerraform = ecsServiceDeploymentControllerToHclTerraform;
exports.ecsServiceLoadBalancerAdvancedConfigurationToTerraform = ecsServiceLoadBalancerAdvancedConfigurationToTerraform;
exports.ecsServiceLoadBalancerAdvancedConfigurationToHclTerraform = ecsServiceLoadBalancerAdvancedConfigurationToHclTerraform;
exports.ecsServiceLoadBalancerToTerraform = ecsServiceLoadBalancerToTerraform;
exports.ecsServiceLoadBalancerToHclTerraform = ecsServiceLoadBalancerToHclTerraform;
exports.ecsServiceNetworkConfigurationToTerraform = ecsServiceNetworkConfigurationToTerraform;
exports.ecsServiceNetworkConfigurationToHclTerraform = ecsServiceNetworkConfigurationToHclTerraform;
exports.ecsServiceOrderedPlacementStrategyToTerraform = ecsServiceOrderedPlacementStrategyToTerraform;
exports.ecsServiceOrderedPlacementStrategyToHclTerraform = ecsServiceOrderedPlacementStrategyToHclTerraform;
exports.ecsServicePlacementConstraintsToTerraform = ecsServicePlacementConstraintsToTerraform;
exports.ecsServicePlacementConstraintsToHclTerraform = ecsServicePlacementConstraintsToHclTerraform;
exports.ecsServiceServiceConnectConfigurationLogConfigurationSecretOptionToTerraform = ecsServiceServiceConnectConfigurationLogConfigurationSecretOptionToTerraform;
exports.ecsServiceServiceConnectConfigurationLogConfigurationSecretOptionToHclTerraform = ecsServiceServiceConnectConfigurationLogConfigurationSecretOptionToHclTerraform;
exports.ecsServiceServiceConnectConfigurationLogConfigurationToTerraform = ecsServiceServiceConnectConfigurationLogConfigurationToTerraform;
exports.ecsServiceServiceConnectConfigurationLogConfigurationToHclTerraform = ecsServiceServiceConnectConfigurationLogConfigurationToHclTerraform;
exports.ecsServiceServiceConnectConfigurationServiceClientAliasTestTrafficRulesHeaderValueToTerraform = ecsServiceServiceConnectConfigurationServiceClientAliasTestTrafficRulesHeaderValueToTerraform;
exports.ecsServiceServiceConnectConfigurationServiceClientAliasTestTrafficRulesHeaderValueToHclTerraform = ecsServiceServiceConnectConfigurationServiceClientAliasTestTrafficRulesHeaderValueToHclTerraform;
exports.ecsServiceServiceConnectConfigurationServiceClientAliasTestTrafficRulesHeaderToTerraform = ecsServiceServiceConnectConfigurationServiceClientAliasTestTrafficRulesHeaderToTerraform;
exports.ecsServiceServiceConnectConfigurationServiceClientAliasTestTrafficRulesHeaderToHclTerraform = ecsServiceServiceConnectConfigurationServiceClientAliasTestTrafficRulesHeaderToHclTerraform;
exports.ecsServiceServiceConnectConfigurationServiceClientAliasTestTrafficRulesToTerraform = ecsServiceServiceConnectConfigurationServiceClientAliasTestTrafficRulesToTerraform;
exports.ecsServiceServiceConnectConfigurationServiceClientAliasTestTrafficRulesToHclTerraform = ecsServiceServiceConnectConfigurationServiceClientAliasTestTrafficRulesToHclTerraform;
exports.ecsServiceServiceConnectConfigurationServiceClientAliasToTerraform = ecsServiceServiceConnectConfigurationServiceClientAliasToTerraform;
exports.ecsServiceServiceConnectConfigurationServiceClientAliasToHclTerraform = ecsServiceServiceConnectConfigurationServiceClientAliasToHclTerraform;
exports.ecsServiceServiceConnectConfigurationServiceTimeoutToTerraform = ecsServiceServiceConnectConfigurationServiceTimeoutToTerraform;
exports.ecsServiceServiceConnectConfigurationServiceTimeoutToHclTerraform = ecsServiceServiceConnectConfigurationServiceTimeoutToHclTerraform;
exports.ecsServiceServiceConnectConfigurationServiceTlsIssuerCertAuthorityToTerraform = ecsServiceServiceConnectConfigurationServiceTlsIssuerCertAuthorityToTerraform;
exports.ecsServiceServiceConnectConfigurationServiceTlsIssuerCertAuthorityToHclTerraform = ecsServiceServiceConnectConfigurationServiceTlsIssuerCertAuthorityToHclTerraform;
exports.ecsServiceServiceConnectConfigurationServiceTlsToTerraform = ecsServiceServiceConnectConfigurationServiceTlsToTerraform;
exports.ecsServiceServiceConnectConfigurationServiceTlsToHclTerraform = ecsServiceServiceConnectConfigurationServiceTlsToHclTerraform;
exports.ecsServiceServiceConnectConfigurationServiceToTerraform = ecsServiceServiceConnectConfigurationServiceToTerraform;
exports.ecsServiceServiceConnectConfigurationServiceToHclTerraform = ecsServiceServiceConnectConfigurationServiceToHclTerraform;
exports.ecsServiceServiceConnectConfigurationToTerraform = ecsServiceServiceConnectConfigurationToTerraform;
exports.ecsServiceServiceConnectConfigurationToHclTerraform = ecsServiceServiceConnectConfigurationToHclTerraform;
exports.ecsServiceServiceRegistriesToTerraform = ecsServiceServiceRegistriesToTerraform;
exports.ecsServiceServiceRegistriesToHclTerraform = ecsServiceServiceRegistriesToHclTerraform;
exports.ecsServiceTimeoutsToTerraform = ecsServiceTimeoutsToTerraform;
exports.ecsServiceTimeoutsToHclTerraform = ecsServiceTimeoutsToHclTerraform;
exports.ecsServiceVolumeConfigurationManagedEbsVolumeTagSpecificationsToTerraform = ecsServiceVolumeConfigurationManagedEbsVolumeTagSpecificationsToTerraform;
exports.ecsServiceVolumeConfigurationManagedEbsVolumeTagSpecificationsToHclTerraform = ecsServiceVolumeConfigurationManagedEbsVolumeTagSpecificationsToHclTerraform;
exports.ecsServiceVolumeConfigurationManagedEbsVolumeToTerraform = ecsServiceVolumeConfigurationManagedEbsVolumeToTerraform;
exports.ecsServiceVolumeConfigurationManagedEbsVolumeToHclTerraform = ecsServiceVolumeConfigurationManagedEbsVolumeToHclTerraform;
exports.ecsServiceVolumeConfigurationToTerraform = ecsServiceVolumeConfigurationToTerraform;
exports.ecsServiceVolumeConfigurationToHclTerraform = ecsServiceVolumeConfigurationToHclTerraform;
exports.ecsServiceVpcLatticeConfigurationsToTerraform = ecsServiceVpcLatticeConfigurationsToTerraform;
exports.ecsServiceVpcLatticeConfigurationsToHclTerraform = ecsServiceVpcLatticeConfigurationsToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function ecsServiceAlarmsToTerraform(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 {
alarm_names: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.alarmNames),
enable: cdktf.booleanToTerraform(struct.enable),
rollback: cdktf.booleanToTerraform(struct.rollback),
};
}
function ecsServiceAlarmsToHclTerraform(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 = {
alarm_names: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.alarmNames),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
enable: {
value: cdktf.booleanToHclTerraform(struct.enable),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
rollback: {
value: cdktf.booleanToHclTerraform(struct.rollback),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class EcsServiceAlarmsOutputReference 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._alarmNames !== undefined) {
hasAnyValues = true;
internalValueResult.alarmNames = this._alarmNames;
}
if (this._enable !== undefined) {
hasAnyValues = true;
internalValueResult.enable = this._enable;
}
if (this._rollback !== undefined) {
hasAnyValues = true;
internalValueResult.rollback = this._rollback;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._alarmNames = undefined;
this._enable = undefined;
this._rollback = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._alarmNames = value.alarmNames;
this._enable = value.enable;
this._rollback = value.rollback;
}
}
get alarmNames() {
return cdktf.Fn.tolist(this.getListAttribute('alarm_names'));
}
set alarmNames(value) {
this._alarmNames = value;
}
// Temporarily expose input value. Use with caution.
get alarmNamesInput() {
return this._alarmNames;
}
get enable() {
return this.getBooleanAttribute('enable');
}
set enable(value) {
this._enable = value;
}
// Temporarily expose input value. Use with caution.
get enableInput() {
return this._enable;
}
get rollback() {
return this.getBooleanAttribute('rollback');
}
set rollback(value) {
this._rollback = value;
}
// Temporarily expose input value. Use with caution.
get rollbackInput() {
return this._rollback;
}
}
exports.EcsServiceAlarmsOutputReference = EcsServiceAlarmsOutputReference;
_a = JSII_RTTI_SYMBOL_1;
EcsServiceAlarmsOutputReference[_a] = { fqn: "@cdktf/provider-aws.ecsService.EcsServiceAlarmsOutputReference", version: "21.22.1" };
function ecsServiceCapacityProviderStrategyToTerraform(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 {
base: cdktf.numberToTerraform(struct.base),
capacity_provider: cdktf.stringToTerraform(struct.capacityProvider),
weight: cdktf.numberToTerraform(struct.weight),
};
}
function ecsServiceCapacityProviderStrategyToHclTerraform(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 = {
base: {
value: cdktf.numberToHclTerraform(struct.base),
isBlock: false,
type: "simple",
storageClassType: "number",
},
capacity_provider: {
value: cdktf.stringToHclTerraform(struct.capacityProvider),
isBlock: false,
type: "simple",
storageClassType: "string",
},
weight: {
value: cdktf.numberToHclTerraform(struct.weight),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class EcsServiceCapacityProviderStrategyOutputReference 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._base !== undefined) {
hasAnyValues = true;
internalValueResult.base = this._base;
}
if (this._capacityProvider !== undefined) {
hasAnyValues = true;
internalValueResult.capacityProvider = this._capacityProvider;
}
if (this._weight !== undefined) {
hasAnyValues = true;
internalValueResult.weight = this._weight;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._base = undefined;
this._capacityProvider = undefined;
this._weight = 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._base = value.base;
this._capacityProvider = value.capacityProvider;
this._weight = value.weight;
}
}
get base() {
return this.getNumberAttribute('base');
}
set base(value) {
this._base = value;
}
resetBase() {
this._base = undefined;
}
// Temporarily expose input value. Use with caution.
get baseInput() {
return this._base;
}
get capacityProvider() {
return this.getStringAttribute('capacity_provider');
}
set capacityProvider(value) {
this._capacityProvider = value;
}
// Temporarily expose input value. Use with caution.
get capacityProviderInput() {
return this._capacityProvider;
}
get weight() {
return this.getNumberAttribute('weight');
}
set weight(value) {
this._weight = value;
}
resetWeight() {
this._weight = undefined;
}
// Temporarily expose input value. Use with caution.
get weightInput() {
return this._weight;
}
}
exports.EcsServiceCapacityProviderStrategyOutputReference = EcsServiceCapacityProviderStrategyOutputReference;
_b = JSII_RTTI_SYMBOL_1;
EcsServiceCapacityProviderStrategyOutputReference[_b] = { fqn: "@cdktf/provider-aws.ecsService.EcsServiceCapacityProviderStrategyOutputReference", version: "21.22.1" };
class EcsServiceCapacityProviderStrategyList 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 EcsServiceCapacityProviderStrategyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.EcsServiceCapacityProviderStrategyList = EcsServiceCapacityProviderStrategyList;
_c = JSII_RTTI_SYMBOL_1;
EcsServiceCapacityProviderStrategyList[_c] = { fqn: "@cdktf/provider-aws.ecsService.EcsServiceCapacityProviderStrategyList", version: "21.22.1" };
function ecsServiceDeploymentCircuitBreakerToTerraform(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: cdktf.booleanToTerraform(struct.enable),
rollback: cdktf.booleanToTerraform(struct.rollback),
};
}
function ecsServiceDeploymentCircuitBreakerToHclTerraform(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: {
value: cdktf.booleanToHclTerraform(struct.enable),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
rollback: {
value: cdktf.booleanToHclTerraform(struct.rollback),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class EcsServiceDeploymentCircuitBreakerOutputReference 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._enable !== undefined) {
hasAnyValues = true;
internalValueResult.enable = this._enable;
}
if (this._rollback !== undefined) {
hasAnyValues = true;
internalValueResult.rollback = this._rollback;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._enable = undefined;
this._rollback = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._enable = value.enable;
this._rollback = value.rollback;
}
}
get enable() {
return this.getBooleanAttribute('enable');
}
set enable(value) {
this._enable = value;
}
// Temporarily expose input value. Use with caution.
get enableInput() {
return this._enable;
}
get rollback() {
return this.getBooleanAttribute('rollback');
}
set rollback(value) {
this._rollback = value;
}
// Temporarily expose input value. Use with caution.
get rollbackInput() {
return this._rollback;
}
}
exports.EcsServiceDeploymentCircuitBreakerOutputReference = EcsServiceDeploymentCircuitBreakerOutputReference;
_d = JSII_RTTI_SYMBOL_1;
EcsServiceDeploymentCircuitBreakerOutputReference[_d] = { fqn: "@cdktf/provider-aws.ecsService.EcsServiceDeploymentCircuitBreakerOutputReference", version: "21.22.1" };
function ecsServiceDeploymentConfigurationCanaryConfigurationToTerraform(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 {
canary_bake_time_in_minutes: cdktf.stringToTerraform(struct.canaryBakeTimeInMinutes),
canary_percent: cdktf.numberToTerraform(struct.canaryPercent),
};
}
function ecsServiceDeploymentConfigurationCanaryConfigurationToHclTerraform(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 = {
canary_bake_time_in_minutes: {
value: cdktf.stringToHclTerraform(struct.canaryBakeTimeInMinutes),
isBlock: false,
type: "simple",
storageClassType: "string",
},
canary_percent: {
value: cdktf.numberToHclTerraform(struct.canaryPercent),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class EcsServiceDeploymentConfigurationCanaryConfigurationOutputReference 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._canaryBakeTimeInMinutes !== undefined) {
hasAnyValues = true;
internalValueResult.canaryBakeTimeInMinutes = this._canaryBakeTimeInMinutes;
}
if (this._canaryPercent !== undefined) {
hasAnyValues = true;
internalValueResult.canaryPercent = this._canaryPercent;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._canaryBakeTimeInMinutes = undefined;
this._canaryPercent = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._canaryBakeTimeInMinutes = value.canaryBakeTimeInMinutes;
this._canaryPercent = value.canaryPercent;
}
}
get canaryBakeTimeInMinutes() {
return this.getStringAttribute('canary_bake_time_in_minutes');
}
set canaryBakeTimeInMinutes(value) {
this._canaryBakeTimeInMinutes = value;
}
resetCanaryBakeTimeInMinutes() {
this._canaryBakeTimeInMinutes = undefined;
}
// Temporarily expose input value. Use with caution.
get canaryBakeTimeInMinutesInput() {
return this._canaryBakeTimeInMinutes;
}
get canaryPercent() {
return this.getNumberAttribute('canary_percent');
}
set canaryPercent(value) {
this._canaryPercent = value;
}
resetCanaryPercent() {
this._canaryPercent = undefined;
}
// Temporarily expose input value. Use with caution.
get canaryPercentInput() {
return this._canaryPercent;
}
}
exports.EcsServiceDeploymentConfigurationCanaryConfigurationOutputReference = EcsServiceDeploymentConfigurationCanaryConfigurationOutputReference;
_e = JSII_RTTI_SYMBOL_1;
EcsServiceDeploymentConfigurationCanaryConfigurationOutputReference[_e] = { fqn: "@cdktf/provider-aws.ecsService.EcsServiceDeploymentConfigurationCanaryConfigurationOutputReference", version: "21.22.1" };
function ecsServiceDeploymentConfigurationLifecycleHookToTerraform(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 {
hook_details: cdktf.stringToTerraform(struct.hookDetails),
hook_target_arn: cdktf.stringToTerraform(struct.hookTargetArn),
lifecycle_stages: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.lifecycleStages),
role_arn: cdktf.stringToTerraform(struct.roleArn),
};
}
function ecsServiceDeploymentConfigurationLifecycleHookToHclTerraform(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 = {
hook_details: {
value: cdktf.stringToHclTerraform(struct.hookDetails),
isBlock: false,
type: "simple",
storageClassType: "string",
},
hook_target_arn: {
value: cdktf.stringToHclTerraform(struct.hookTargetArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
lifecycle_stages: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.lifecycleStages),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
role_arn: {
value: cdktf.stringToHclTerraform(struct.roleArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class EcsServiceDeploymentConfigurationLifecycleHookOutputReference 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._hookDetails !== undefined) {
hasAnyValues = true;
internalValueResult.hookDetails = this._hookDetails;
}
if (this._hookTargetArn !== undefined) {
hasAnyValues = true;
internalValueResult.hookTargetArn = this._hookTargetArn;
}
if (this._lifecycleStages !== undefined) {
hasAnyValues = true;
internalValueResult.lifecycleStages = this._lifecycleStages;
}
if (this._roleArn !== undefined) {
hasAnyValues = true;
internalValueResult.roleArn = this._roleArn;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._hookDetails = undefined;
this._hookTargetArn = undefined;
this._lifecycleStages = undefined;
this._roleArn = 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._hookDetails = value.hookDetails;
this._hookTargetArn = value.hookTargetArn;
this._lifecycleStages = value.lifecycleStages;
this._roleArn = value.roleArn;
}
}
get hookDetails() {
return this.getStringAttribute('hook_details');
}
set hookDetails(value) {
this._hookDetails = value;
}
resetHookDetails() {
this._hookDetails = undefined;
}
// Temporarily expose input value. Use with caution.
get hookDetailsInput() {
return this._hookDetails;
}
get hookTargetArn() {
return this.getStringAttribute('hook_target_arn');
}
set hookTargetArn(value) {
this._hookTargetArn = value;
}
// Temporarily expose input value. Use with caution.
get hookTargetArnInput() {
return this._hookTargetArn;
}
get lifecycleStages() {
return this.getListAttribute('lifecycle_stages');
}
set lifecycleStages(value) {
this._lifecycleStages = value;
}
// Temporarily expose input value. Use with caution.
get lifecycleStagesInput() {
return this._lifecycleStages;
}
get roleArn() {
return this.getStringAttribute('role_arn');
}
set roleArn(value) {
this._roleArn = value;
}
// Temporarily expose input value. Use with caution.
get roleArnInput() {
return this._roleArn;
}
}
exports.EcsServiceDeploymentConfigurationLifecycleHookOutputReference = EcsServiceDeploymentConfigurationLifecycleHookOutputReference;
_f = JSII_RTTI_SYMBOL_1;
EcsServiceDeploymentConfigurationLifecycleHookOutputReference[_f] = { fqn: "@cdktf/provider-aws.ecsService.EcsServiceDeploymentConfigurationLifecycleHookOutputReference", version: "21.22.1" };
class EcsServiceDeploymentConfigurationLifecycleHookList 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 EcsServiceDeploymentConfigurationLifecycleHookOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.EcsServiceDeploymentConfigurationLifecycleHookList = EcsServiceDeploymentConfigurationLifecycleHookList;
_g = JSII_RTTI_SYMBOL_1;
EcsServiceDeploymentConfigurationLifecycleHookList[_g] = { fqn: "@cdktf/provider-aws.ecsService.EcsServiceDeploymentConfigurationLifecycleHookList", version: "21.22.1" };
function ecsServiceDeploymentConfigurationLinearConfigurationToTerraform(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 {
step_bake_time_in_minutes: cdktf.stringToTerraform(struct.stepBakeTimeInMinutes),
step_percent: cdktf.numberToTerraform(struct.stepPercent),
};
}
function ecsServiceDeploymentConfigurationLinearConfigurationToHclTerraform(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 = {
step_bake_time_in_minutes: {
value: cdktf.stringToHclTerraform(struct.stepBakeTimeInMinutes),
isBlock: false,
type: "simple",
storageClassType: "string",
},
step_percent: {
value: cdktf.numberToHclTerraform(struct.stepPercent),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class EcsServiceDeploymentConfigurationLinearConfigurationOutputReference 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._stepBakeTimeInMinutes !== undefined) {
hasAnyValues = true;
internalValueResult.stepBakeTimeInMinutes = this._stepBakeTimeInMinutes;
}
if (this._stepPercent !== undefined) {
hasAnyValues = true;
internalValueResult.stepPercent = this._stepPercent;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._stepBakeTimeInMinutes = undefined;
this._stepPercent = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._stepBakeTimeInMinutes = value.stepBakeTimeInMinutes;
this._stepPercent = value.stepPercent;
}
}
get stepBakeTimeInMinutes() {
return this.getStringAttribute('step_bake_time_in_minutes');
}
set stepBakeTimeInMinutes(value) {
this._stepBakeTimeInMinutes = value;
}
resetStepBakeTimeInMinutes() {
this._stepBakeTimeInMinutes = undefined;
}
// Temporarily expose input value. Use with caution.
get stepBakeTimeInMinutesInput() {
return this._stepBakeTimeInMinutes;
}
get stepPercent() {
return this.getNumberAttribute('step_percent');
}
set stepPercent(value) {
this._stepPercent = value;
}
resetStepPercent() {
this._stepPercent = undefined;
}
// Temporarily expose input value. Use with caution.
get stepPercentInput() {
return this._stepPercent;
}
}
exports.EcsServiceDeploymentConfigurationLinearConfigurationOutputReference = EcsServiceDeploymentConfigurationLinearConfigurationOutputReference;
_h = JSII_RTTI_SYMBOL_1;
EcsServiceDeploymentConfigurationLinearConfigurationOutputReference[_h] = { fqn: "@cdktf/provider-aws.ecsService.EcsServiceDeploymentConfigurationLinearConfigurationOutputReference", version: "21.22.1" };
function ecsServiceDeploymentConfigurationToTerraform(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 {
bake_time_in_minutes: cdktf.stringToTerraform(struct.bakeTimeInMinutes),
strategy: cdktf.stringToTerraform(struct.strategy),
canary_configuration: ecsServiceDeploymentConfigurationCanaryConfigurationToTerraform(struct.canaryConfiguration),
lifecycle_hook: cdktf.listMapper(ecsServiceDeploymentConfigurationLifecycleHookToTerraform, true)(struct.lifecycleHook),
linear_configuration: ecsServiceDeploymentConfigurationLinearConfigurationToTerraform(struct.linearConfiguration),
};
}
function ecsServiceDeploymentConfigurationToHclTerraform(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 = {
bake_time_in_minutes: {
value: cdktf.stringToHclTerraform(struct.bakeTimeInMinutes),
isBlock: false,
type: "simple",
storageClassType: "string",
},
strategy: {
value: cdktf.stringToHclTerraform(struct.strategy),
isBlock: false,
type: "simple",
storageClassType: "string",
},
canary_configuration: {
value: ecsServiceDeploymentConfigurationCanaryConfigurationToHclTerraform(struct.canaryConfiguration),
isBlock: true,
type: "list",
storageClassType: "EcsServiceDeploymentConfigurationCanaryConfigurationList",
},
lifecycle_hook: {
value: cdktf.listMapperHcl(ecsServiceDeploymentConfigurationLifecycleHookToHclTerraform, true)(struct.lifecycleHook),
isBlock: true,
type: "set",
storageClassType: "EcsServiceDeploymentConfigurationLifecycleHookList",
},
linear_configuration: {
value: ecsServiceDeploymentConfigurationLinearConfigurationToHclTerraform(struct.linearConfiguration),
isBlock: true,
type: "list",
storageClassType: "EcsServiceDeploymentConfigurationLinearConfigurationList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class EcsServiceDeploymentConfigurationOutputReference 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;
// canary_configuration - computed: false, optional: true, required: false
this._canaryConfiguration = new EcsServiceDeploymentConfigurationCanaryConfigurationOutputReference(this, "canary_configuration");
// lifecycle_hook - computed: false, optional: true, required: false
this._lifecycleHook = new EcsServiceDeploymentConfigurationLifecycleHookList(this, "lifecycle_hook", true);
// linear_configuration - computed: false, optional: true, required: false
this._linearConfiguration = new EcsServiceDeploymentConfigurationLinearConfigurationOutputReference(this, "linear_configuration");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._bakeTimeInMinutes !== undefined) {
hasAnyValues = true;
internalValueResult.bakeTimeInMinutes = this._bakeTimeInMinutes;
}
if (this._strategy !== undefined) {
hasAnyValues = true;
internalValueResult.strategy = this._strategy;
}
if (this._canaryConfiguration?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.canaryConfiguration = this._canaryConfiguration?.internalValue;
}
if (this._lifecycleHook?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.lifecycleHook = this._lifecycleHook?.internalValue;
}
if (this._linearConfiguration?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.linearConfiguration = this._linearConfiguration?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._bakeTimeInMinutes = undefined;
this._strategy = undefined;
this._canaryConfiguration.internalValue = undefined;
this._lifecycleHook.internalValue = undefined;
this._linearConfiguration.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._bakeTimeInMinutes = value.bakeTimeInMinutes;
this._strategy = value.strategy;
this._canaryConfiguration.internalValue = value.canaryConfiguration;
this._lifecycleHook.internalValue = value.lifecycleHook;
this._linearConfiguration.internalValue = value.linearConfiguration;
}
}
get bakeTimeInMinutes() {
return this.getStringAttribute('bake_time_in_minutes');
}
set bakeTimeInMinutes(value) {
this._bakeTimeInMinutes = value;
}
resetBakeTimeInMinutes() {
this._bakeTimeInMinutes = undefined;
}
// Temporarily expose input value. Use with caution.
get bakeTimeInMinutesInput() {
return this._bakeTimeInMinutes;
}
get strategy() {
return this.getStringAttribute('strategy');
}
set strategy(value) {
this._strategy = value;
}
resetStrategy() {
this._strategy = undefined;
}
// Temporarily expose input value. Use with caution.
get strategyInput() {
return this._strategy;
}
get canaryConfiguration() {
return this._canaryConfiguration;
}
putCanaryConfiguration(value) {
this._canaryConfiguration.internalValue = value;
}
resetCanaryConfiguration() {
this._canaryConfiguration.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get canaryConfigurationInput() {
return this._canaryConfiguration.internalValue;
}
get lifecycleHook() {
return this._lifecycleHook;
}
putLifecycleHook(value) {
this._lifecycleHook.internalValue = value;
}
resetLifecycleHook() {
this._lifecycleHook.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get lifecycleHookInput() {
return this._lifecycleHook.internalValue;
}
get linearConfiguration() {
return this._linearConfiguration;
}
putLinearConfiguration(value) {
this._linearConfiguration.internalValue = value;
}
resetLinearConfiguration() {
this._linearConfiguration.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get linearConfigurationInput() {
return this._linearConfiguration.internalValue;
}
}
exports.EcsServiceDeploymentConfigurationOutputReference = EcsServiceDeploymentConfigurationOutputReference;
_j = JSII_RTTI_SYMBOL_1;
EcsServiceDeploymentConfigurationOutputReference[_j] = { fqn: "@cdktf/provider-aws.ecsService.EcsServiceDeploymentConfigurationOutputReference", version: "21.22.1" };
function ecsServiceDeploymentControllerToTerraform(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),
};
}
function ecsServiceDeploymentControllerToHclTerraform(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",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class EcsServiceDeploymentControllerOutputReference 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._type !== undefined) {
hasAnyValues = true;
internalValueResult.type = this._type;
}