UNPKG

@cdktf/provider-aws

Version:

Prebuilt aws Provider for Terraform CDK (cdktf)

1,259 lines 206 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; Object.defineProperty(exports, "__esModule", { value: true }); exports.BudgetsBudget = exports.BudgetsBudgetPlannedLimitList = exports.BudgetsBudgetPlannedLimitOutputReference = exports.BudgetsBudgetNotificationList = exports.BudgetsBudgetNotificationOutputReference = exports.BudgetsBudgetCostTypesOutputReference = exports.BudgetsBudgetCostFilterList = exports.BudgetsBudgetCostFilterOutputReference = exports.BudgetsBudgetAutoAdjustDataOutputReference = exports.BudgetsBudgetAutoAdjustDataHistoricalOptionsOutputReference = void 0; exports.budgetsBudgetAutoAdjustDataHistoricalOptionsToTerraform = budgetsBudgetAutoAdjustDataHistoricalOptionsToTerraform; exports.budgetsBudgetAutoAdjustDataHistoricalOptionsToHclTerraform = budgetsBudgetAutoAdjustDataHistoricalOptionsToHclTerraform; exports.budgetsBudgetAutoAdjustDataToTerraform = budgetsBudgetAutoAdjustDataToTerraform; exports.budgetsBudgetAutoAdjustDataToHclTerraform = budgetsBudgetAutoAdjustDataToHclTerraform; exports.budgetsBudgetCostFilterToTerraform = budgetsBudgetCostFilterToTerraform; exports.budgetsBudgetCostFilterToHclTerraform = budgetsBudgetCostFilterToHclTerraform; exports.budgetsBudgetCostTypesToTerraform = budgetsBudgetCostTypesToTerraform; exports.budgetsBudgetCostTypesToHclTerraform = budgetsBudgetCostTypesToHclTerraform; exports.budgetsBudgetNotificationToTerraform = budgetsBudgetNotificationToTerraform; exports.budgetsBudgetNotificationToHclTerraform = budgetsBudgetNotificationToHclTerraform; exports.budgetsBudgetPlannedLimitToTerraform = budgetsBudgetPlannedLimitToTerraform; exports.budgetsBudgetPlannedLimitToHclTerraform = budgetsBudgetPlannedLimitToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function budgetsBudgetAutoAdjustDataHistoricalOptionsToTerraform(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 { budget_adjustment_period: cdktf.numberToTerraform(struct.budgetAdjustmentPeriod), }; } function budgetsBudgetAutoAdjustDataHistoricalOptionsToHclTerraform(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 = { budget_adjustment_period: { value: cdktf.numberToHclTerraform(struct.budgetAdjustmentPeriod), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BudgetsBudgetAutoAdjustDataHistoricalOptionsOutputReference 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._budgetAdjustmentPeriod !== undefined) { hasAnyValues = true; internalValueResult.budgetAdjustmentPeriod = this._budgetAdjustmentPeriod; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._budgetAdjustmentPeriod = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._budgetAdjustmentPeriod = value.budgetAdjustmentPeriod; } } get budgetAdjustmentPeriod() { return this.getNumberAttribute('budget_adjustment_period'); } set budgetAdjustmentPeriod(value) { this._budgetAdjustmentPeriod = value; } // Temporarily expose input value. Use with caution. get budgetAdjustmentPeriodInput() { return this._budgetAdjustmentPeriod; } // lookback_available_periods - computed: true, optional: false, required: false get lookbackAvailablePeriods() { return this.getNumberAttribute('lookback_available_periods'); } } exports.BudgetsBudgetAutoAdjustDataHistoricalOptionsOutputReference = BudgetsBudgetAutoAdjustDataHistoricalOptionsOutputReference; _a = JSII_RTTI_SYMBOL_1; BudgetsBudgetAutoAdjustDataHistoricalOptionsOutputReference[_a] = { fqn: "@cdktf/provider-aws.budgetsBudget.BudgetsBudgetAutoAdjustDataHistoricalOptionsOutputReference", version: "21.22.1" }; function budgetsBudgetAutoAdjustDataToTerraform(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 { auto_adjust_type: cdktf.stringToTerraform(struct.autoAdjustType), historical_options: budgetsBudgetAutoAdjustDataHistoricalOptionsToTerraform(struct.historicalOptions), }; } function budgetsBudgetAutoAdjustDataToHclTerraform(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 = { auto_adjust_type: { value: cdktf.stringToHclTerraform(struct.autoAdjustType), isBlock: false, type: "simple", storageClassType: "string", }, historical_options: { value: budgetsBudgetAutoAdjustDataHistoricalOptionsToHclTerraform(struct.historicalOptions), isBlock: true, type: "list", storageClassType: "BudgetsBudgetAutoAdjustDataHistoricalOptionsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BudgetsBudgetAutoAdjustDataOutputReference 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; // historical_options - computed: false, optional: true, required: false this._historicalOptions = new BudgetsBudgetAutoAdjustDataHistoricalOptionsOutputReference(this, "historical_options"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._autoAdjustType !== undefined) { hasAnyValues = true; internalValueResult.autoAdjustType = this._autoAdjustType; } if (this._historicalOptions?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.historicalOptions = this._historicalOptions?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._autoAdjustType = undefined; this._historicalOptions.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._autoAdjustType = value.autoAdjustType; this._historicalOptions.internalValue = value.historicalOptions; } } get autoAdjustType() { return this.getStringAttribute('auto_adjust_type'); } set autoAdjustType(value) { this._autoAdjustType = value; } // Temporarily expose input value. Use with caution. get autoAdjustTypeInput() { return this._autoAdjustType; } // last_auto_adjust_time - computed: true, optional: false, required: false get lastAutoAdjustTime() { return this.getStringAttribute('last_auto_adjust_time'); } get historicalOptions() { return this._historicalOptions; } putHistoricalOptions(value) { this._historicalOptions.internalValue = value; } resetHistoricalOptions() { this._historicalOptions.internalValue = undefined; } // Temporarily expose input value. Use with caution. get historicalOptionsInput() { return this._historicalOptions.internalValue; } } exports.BudgetsBudgetAutoAdjustDataOutputReference = BudgetsBudgetAutoAdjustDataOutputReference; _b = JSII_RTTI_SYMBOL_1; BudgetsBudgetAutoAdjustDataOutputReference[_b] = { fqn: "@cdktf/provider-aws.budgetsBudget.BudgetsBudgetAutoAdjustDataOutputReference", version: "21.22.1" }; function budgetsBudgetCostFilterToTerraform(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), values: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.values), }; } function budgetsBudgetCostFilterToHclTerraform(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", }, values: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.values), isBlock: false, type: "list", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BudgetsBudgetCostFilterOutputReference 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._name !== undefined) { hasAnyValues = true; internalValueResult.name = this._name; } if (this._values !== undefined) { hasAnyValues = true; internalValueResult.values = this._values; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._name = undefined; this._values = 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._name = value.name; this._values = value.values; } } 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 values() { return this.getListAttribute('values'); } set values(value) { this._values = value; } // Temporarily expose input value. Use with caution. get valuesInput() { return this._values; } } exports.BudgetsBudgetCostFilterOutputReference = BudgetsBudgetCostFilterOutputReference; _c = JSII_RTTI_SYMBOL_1; BudgetsBudgetCostFilterOutputReference[_c] = { fqn: "@cdktf/provider-aws.budgetsBudget.BudgetsBudgetCostFilterOutputReference", version: "21.22.1" }; class BudgetsBudgetCostFilterList 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 BudgetsBudgetCostFilterOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.BudgetsBudgetCostFilterList = BudgetsBudgetCostFilterList; _d = JSII_RTTI_SYMBOL_1; BudgetsBudgetCostFilterList[_d] = { fqn: "@cdktf/provider-aws.budgetsBudget.BudgetsBudgetCostFilterList", version: "21.22.1" }; function budgetsBudgetCostTypesToTerraform(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 { include_credit: cdktf.booleanToTerraform(struct.includeCredit), include_discount: cdktf.booleanToTerraform(struct.includeDiscount), include_other_subscription: cdktf.booleanToTerraform(struct.includeOtherSubscription), include_recurring: cdktf.booleanToTerraform(struct.includeRecurring), include_refund: cdktf.booleanToTerraform(struct.includeRefund), include_subscription: cdktf.booleanToTerraform(struct.includeSubscription), include_support: cdktf.booleanToTerraform(struct.includeSupport), include_tax: cdktf.booleanToTerraform(struct.includeTax), include_upfront: cdktf.booleanToTerraform(struct.includeUpfront), use_amortized: cdktf.booleanToTerraform(struct.useAmortized), use_blended: cdktf.booleanToTerraform(struct.useBlended), }; } function budgetsBudgetCostTypesToHclTerraform(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 = { include_credit: { value: cdktf.booleanToHclTerraform(struct.includeCredit), isBlock: false, type: "simple", storageClassType: "boolean", }, include_discount: { value: cdktf.booleanToHclTerraform(struct.includeDiscount), isBlock: false, type: "simple", storageClassType: "boolean", }, include_other_subscription: { value: cdktf.booleanToHclTerraform(struct.includeOtherSubscription), isBlock: false, type: "simple", storageClassType: "boolean", }, include_recurring: { value: cdktf.booleanToHclTerraform(struct.includeRecurring), isBlock: false, type: "simple", storageClassType: "boolean", }, include_refund: { value: cdktf.booleanToHclTerraform(struct.includeRefund), isBlock: false, type: "simple", storageClassType: "boolean", }, include_subscription: { value: cdktf.booleanToHclTerraform(struct.includeSubscription), isBlock: false, type: "simple", storageClassType: "boolean", }, include_support: { value: cdktf.booleanToHclTerraform(struct.includeSupport), isBlock: false, type: "simple", storageClassType: "boolean", }, include_tax: { value: cdktf.booleanToHclTerraform(struct.includeTax), isBlock: false, type: "simple", storageClassType: "boolean", }, include_upfront: { value: cdktf.booleanToHclTerraform(struct.includeUpfront), isBlock: false, type: "simple", storageClassType: "boolean", }, use_amortized: { value: cdktf.booleanToHclTerraform(struct.useAmortized), isBlock: false, type: "simple", storageClassType: "boolean", }, use_blended: { value: cdktf.booleanToHclTerraform(struct.useBlended), isBlock: false, type: "simple", storageClassType: "boolean", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BudgetsBudgetCostTypesOutputReference 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._includeCredit !== undefined) { hasAnyValues = true; internalValueResult.includeCredit = this._includeCredit; } if (this._includeDiscount !== undefined) { hasAnyValues = true; internalValueResult.includeDiscount = this._includeDiscount; } if (this._includeOtherSubscription !== undefined) { hasAnyValues = true; internalValueResult.includeOtherSubscription = this._includeOtherSubscription; } if (this._includeRecurring !== undefined) { hasAnyValues = true; internalValueResult.includeRecurring = this._includeRecurring; } if (this._includeRefund !== undefined) { hasAnyValues = true; internalValueResult.includeRefund = this._includeRefund; } if (this._includeSubscription !== undefined) { hasAnyValues = true; internalValueResult.includeSubscription = this._includeSubscription; } if (this._includeSupport !== undefined) { hasAnyValues = true; internalValueResult.includeSupport = this._includeSupport; } if (this._includeTax !== undefined) { hasAnyValues = true; internalValueResult.includeTax = this._includeTax; } if (this._includeUpfront !== undefined) { hasAnyValues = true; internalValueResult.includeUpfront = this._includeUpfront; } if (this._useAmortized !== undefined) { hasAnyValues = true; internalValueResult.useAmortized = this._useAmortized; } if (this._useBlended !== undefined) { hasAnyValues = true; internalValueResult.useBlended = this._useBlended; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._includeCredit = undefined; this._includeDiscount = undefined; this._includeOtherSubscription = undefined; this._includeRecurring = undefined; this._includeRefund = undefined; this._includeSubscription = undefined; this._includeSupport = undefined; this._includeTax = undefined; this._includeUpfront = undefined; this._useAmortized = undefined; this._useBlended = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._includeCredit = value.includeCredit; this._includeDiscount = value.includeDiscount; this._includeOtherSubscription = value.includeOtherSubscription; this._includeRecurring = value.includeRecurring; this._includeRefund = value.includeRefund; this._includeSubscription = value.includeSubscription; this._includeSupport = value.includeSupport; this._includeTax = value.includeTax; this._includeUpfront = value.includeUpfront; this._useAmortized = value.useAmortized; this._useBlended = value.useBlended; } } get includeCredit() { return this.getBooleanAttribute('include_credit'); } set includeCredit(value) { this._includeCredit = value; } resetIncludeCredit() { this._includeCredit = undefined; } // Temporarily expose input value. Use with caution. get includeCreditInput() { return this._includeCredit; } get includeDiscount() { return this.getBooleanAttribute('include_discount'); } set includeDiscount(value) { this._includeDiscount = value; } resetIncludeDiscount() { this._includeDiscount = undefined; } // Temporarily expose input value. Use with caution. get includeDiscountInput() { return this._includeDiscount; } get includeOtherSubscription() { return this.getBooleanAttribute('include_other_subscription'); } set includeOtherSubscription(value) { this._includeOtherSubscription = value; } resetIncludeOtherSubscription() { this._includeOtherSubscription = undefined; } // Temporarily expose input value. Use with caution. get includeOtherSubscriptionInput() { return this._includeOtherSubscription; } get includeRecurring() { return this.getBooleanAttribute('include_recurring'); } set includeRecurring(value) { this._includeRecurring = value; } resetIncludeRecurring() { this._includeRecurring = undefined; } // Temporarily expose input value. Use with caution. get includeRecurringInput() { return this._includeRecurring; } get includeRefund() { return this.getBooleanAttribute('include_refund'); } set includeRefund(value) { this._includeRefund = value; } resetIncludeRefund() { this._includeRefund = undefined; } // Temporarily expose input value. Use with caution. get includeRefundInput() { return this._includeRefund; } get includeSubscription() { return this.getBooleanAttribute('include_subscription'); } set includeSubscription(value) { this._includeSubscription = value; } resetIncludeSubscription() { this._includeSubscription = undefined; } // Temporarily expose input value. Use with caution. get includeSubscriptionInput() { return this._includeSubscription; } get includeSupport() { return this.getBooleanAttribute('include_support'); } set includeSupport(value) { this._includeSupport = value; } resetIncludeSupport() { this._includeSupport = undefined; } // Temporarily expose input value. Use with caution. get includeSupportInput() { return this._includeSupport; } get includeTax() { return this.getBooleanAttribute('include_tax'); } set includeTax(value) { this._includeTax = value; } resetIncludeTax() { this._includeTax = undefined; } // Temporarily expose input value. Use with caution. get includeTaxInput() { return this._includeTax; } get includeUpfront() { return this.getBooleanAttribute('include_upfront'); } set includeUpfront(value) { this._includeUpfront = value; } resetIncludeUpfront() { this._includeUpfront = undefined; } // Temporarily expose input value. Use with caution. get includeUpfrontInput() { return this._includeUpfront; } get useAmortized() { return this.getBooleanAttribute('use_amortized'); } set useAmortized(value) { this._useAmortized = value; } resetUseAmortized() { this._useAmortized = undefined; } // Temporarily expose input value. Use with caution. get useAmortizedInput() { return this._useAmortized; } get useBlended() { return this.getBooleanAttribute('use_blended'); } set useBlended(value) { this._useBlended = value; } resetUseBlended() { this._useBlended = undefined; } // Temporarily expose input value. Use with caution. get useBlendedInput() { return this._useBlended; } } exports.BudgetsBudgetCostTypesOutputReference = BudgetsBudgetCostTypesOutputReference; _e = JSII_RTTI_SYMBOL_1; BudgetsBudgetCostTypesOutputReference[_e] = { fqn: "@cdktf/provider-aws.budgetsBudget.BudgetsBudgetCostTypesOutputReference", version: "21.22.1" }; function budgetsBudgetNotificationToTerraform(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 { comparison_operator: cdktf.stringToTerraform(struct.comparisonOperator), notification_type: cdktf.stringToTerraform(struct.notificationType), subscriber_email_addresses: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.subscriberEmailAddresses), subscriber_sns_topic_arns: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.subscriberSnsTopicArns), threshold: cdktf.numberToTerraform(struct.threshold), threshold_type: cdktf.stringToTerraform(struct.thresholdType), }; } function budgetsBudgetNotificationToHclTerraform(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 = { comparison_operator: { value: cdktf.stringToHclTerraform(struct.comparisonOperator), isBlock: false, type: "simple", storageClassType: "string", }, notification_type: { value: cdktf.stringToHclTerraform(struct.notificationType), isBlock: false, type: "simple", storageClassType: "string", }, subscriber_email_addresses: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.subscriberEmailAddresses), isBlock: false, type: "set", storageClassType: "stringList", }, subscriber_sns_topic_arns: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.subscriberSnsTopicArns), isBlock: false, type: "set", storageClassType: "stringList", }, threshold: { value: cdktf.numberToHclTerraform(struct.threshold), isBlock: false, type: "simple", storageClassType: "number", }, threshold_type: { value: cdktf.stringToHclTerraform(struct.thresholdType), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BudgetsBudgetNotificationOutputReference 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._comparisonOperator !== undefined) { hasAnyValues = true; internalValueResult.comparisonOperator = this._comparisonOperator; } if (this._notificationType !== undefined) { hasAnyValues = true; internalValueResult.notificationType = this._notificationType; } if (this._subscriberEmailAddresses !== undefined) { hasAnyValues = true; internalValueResult.subscriberEmailAddresses = this._subscriberEmailAddresses; } if (this._subscriberSnsTopicArns !== undefined) { hasAnyValues = true; internalValueResult.subscriberSnsTopicArns = this._subscriberSnsTopicArns; } if (this._threshold !== undefined) { hasAnyValues = true; internalValueResult.threshold = this._threshold; } if (this._thresholdType !== undefined) { hasAnyValues = true; internalValueResult.thresholdType = this._thresholdType; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._comparisonOperator = undefined; this._notificationType = undefined; this._subscriberEmailAddresses = undefined; this._subscriberSnsTopicArns = undefined; this._threshold = undefined; this._thresholdType = 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._comparisonOperator = value.comparisonOperator; this._notificationType = value.notificationType; this._subscriberEmailAddresses = value.subscriberEmailAddresses; this._subscriberSnsTopicArns = value.subscriberSnsTopicArns; this._threshold = value.threshold; this._thresholdType = value.thresholdType; } } get comparisonOperator() { return this.getStringAttribute('comparison_operator'); } set comparisonOperator(value) { this._comparisonOperator = value; } // Temporarily expose input value. Use with caution. get comparisonOperatorInput() { return this._comparisonOperator; } get notificationType() { return this.getStringAttribute('notification_type'); } set notificationType(value) { this._notificationType = value; } // Temporarily expose input value. Use with caution. get notificationTypeInput() { return this._notificationType; } get subscriberEmailAddresses() { return cdktf.Fn.tolist(this.getListAttribute('subscriber_email_addresses')); } set subscriberEmailAddresses(value) { this._subscriberEmailAddresses = value; } resetSubscriberEmailAddresses() { this._subscriberEmailAddresses = undefined; } // Temporarily expose input value. Use with caution. get subscriberEmailAddressesInput() { return this._subscriberEmailAddresses; } get subscriberSnsTopicArns() { return cdktf.Fn.tolist(this.getListAttribute('subscriber_sns_topic_arns')); } set subscriberSnsTopicArns(value) { this._subscriberSnsTopicArns = value; } resetSubscriberSnsTopicArns() { this._subscriberSnsTopicArns = undefined; } // Temporarily expose input value. Use with caution. get subscriberSnsTopicArnsInput() { return this._subscriberSnsTopicArns; } get threshold() { return this.getNumberAttribute('threshold'); } set threshold(value) { this._threshold = value; } // Temporarily expose input value. Use with caution. get thresholdInput() { return this._threshold; } get thresholdType() { return this.getStringAttribute('threshold_type'); } set thresholdType(value) { this._thresholdType = value; } // Temporarily expose input value. Use with caution. get thresholdTypeInput() { return this._thresholdType; } } exports.BudgetsBudgetNotificationOutputReference = BudgetsBudgetNotificationOutputReference; _f = JSII_RTTI_SYMBOL_1; BudgetsBudgetNotificationOutputReference[_f] = { fqn: "@cdktf/provider-aws.budgetsBudget.BudgetsBudgetNotificationOutputReference", version: "21.22.1" }; class BudgetsBudgetNotificationList 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 BudgetsBudgetNotificationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.BudgetsBudgetNotificationList = BudgetsBudgetNotificationList; _g = JSII_RTTI_SYMBOL_1; BudgetsBudgetNotificationList[_g] = { fqn: "@cdktf/provider-aws.budgetsBudget.BudgetsBudgetNotificationList", version: "21.22.1" }; function budgetsBudgetPlannedLimitToTerraform(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 { amount: cdktf.stringToTerraform(struct.amount), start_time: cdktf.stringToTerraform(struct.startTime), unit: cdktf.stringToTerraform(struct.unit), }; } function budgetsBudgetPlannedLimitToHclTerraform(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 = { amount: { value: cdktf.stringToHclTerraform(struct.amount), isBlock: false, type: "simple", storageClassType: "string", }, start_time: { value: cdktf.stringToHclTerraform(struct.startTime), isBlock: false, type: "simple", storageClassType: "string", }, unit: { value: cdktf.stringToHclTerraform(struct.unit), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class BudgetsBudgetPlannedLimitOutputReference 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._amount !== undefined) { hasAnyValues = true; internalValueResult.amount = this._amount; } if (this._startTime !== undefined) { hasAnyValues = true; internalValueResult.startTime = this._startTime; } if (this._unit !== undefined) { hasAnyValues = true; internalValueResult.unit = this._unit; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._amount = undefined; this._startTime = undefined; this._unit = 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._amount = value.amount; this._startTime = value.startTime; this._unit = value.unit; } } get amount() { return this.getStringAttribute('amount'); } set amount(value) { this._amount = value; } // Temporarily expose input value. Use with caution. get amountInput() { return this._amount; } get startTime() { return this.getStringAttribute('start_time'); } set startTime(value) { this._startTime = value; } // Temporarily expose input value. Use with caution. get startTimeInput() { return this._startTime; } get unit() { return this.getStringAttribute('unit'); } set unit(value) { this._unit = value; } // Temporarily expose input value. Use with caution. get unitInput() { return this._unit; } } exports.BudgetsBudgetPlannedLimitOutputReference = BudgetsBudgetPlannedLimitOutputReference; _h = JSII_RTTI_SYMBOL_1; BudgetsBudgetPlannedLimitOutputReference[_h] = { fqn: "@cdktf/provider-aws.budgetsBudget.BudgetsBudgetPlannedLimitOutputReference", version: "21.22.1" }; class BudgetsBudgetPlannedLimitList 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 BudgetsBudgetPlannedLimitOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.BudgetsBudgetPlannedLimitList = BudgetsBudgetPlannedLimitList; _j = JSII_RTTI_SYMBOL_1; BudgetsBudgetPlannedLimitList[_j] = { fqn: "@cdktf/provider-aws.budgetsBudget.BudgetsBudgetPlannedLimitList", version: "21.22.1" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/budgets_budget aws_budgets_budget} */ class BudgetsBudget extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a BudgetsBudget 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 BudgetsBudget to import * @param importFromId The id of the existing BudgetsBudget that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/budgets_budget#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the BudgetsBudget to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_budgets_budget", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/budgets_budget aws_budgets_budget} 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 BudgetsBudgetConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'aws_budgets_budget', 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 }); // auto_adjust_data - computed: false, optional: true, required: false this._autoAdjustData = new BudgetsBudgetAutoAdjustDataOutputReference(this, "auto_adjust_data"); // cost_filter - computed: false, optional: true, required: false this._costFilter = new BudgetsBudgetCostFilterList(this, "cost_filter", true); // cost_types - computed: false, optional: true, required: false this._costTypes = new BudgetsBudgetCostTypesOutputReference(this, "cost_types"); // notification - computed: false, optional: true, required: false this._notification = new BudgetsBudgetNotificationList(this, "notification", true); // planned_limit - computed: false, optional: true, required: false this._plannedLimit = new BudgetsBudgetPlannedLimitList(this, "planned_limit", true); this._accountId = config.accountId; this._billingViewArn = config.billingViewArn; this._budgetType = config.budgetType; this._id = config.id; this._limitAmount = config.limitAmount; this._limitUnit = config.limitUnit; this._name = config.name; this._namePrefix = config.namePrefix; this._tags = config.tags; this._tagsAll = config.tagsAll; this._timePeriodEnd = config.timePeriodEnd; this._timePeriodStart = config.timePeriodStart; this._timeUnit = config.timeUnit; this._autoAdjustData.internalValue = config.autoAdjustData; this._costFilter.internalValue = config.costFilter; this._costTypes.internalValue = config.costTypes; this._notification.internalValue = config.notification; this._plannedLimit.internalValue = config.plannedLimit; } get accountId() { return this.getStringAttribute('account_id'); } set accountId(value) { this._accountId = value; } resetAccountId() { this._accountId = undefined; } // Temporarily expose input value. Use with caution. get accountIdInput() { return this._accountId; } // arn - computed: true, optional: false, required: false get arn() { return this.getStringAttribute('arn'); } get billingViewArn() { return this.getStringAttribute('billing_view_arn'); } set billingViewArn(value) { this._billingViewArn = value; } resetBillingViewArn() { this._billingViewArn = undefined; } // Temporarily expose input value. Use with caution. get billingViewArnInput() { return this._billingViewArn; } get budgetType() { return this.getStringAttribute('budget_type'); } set budgetType(value) { this._budgetType = value; } // Temporarily expose input value. Use with caution. get budgetTypeInput() { return this._budgetType; } 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 limitAmount() { return this.getStringAttribute('limit_amount'); } set limitAmount(value) { this._limitAmount = value; } resetLimitAmount() { this._limitAmount = undefined; } // Temporarily expose input value. Use with caution. get limitAmountInput() { return this._limitAmount; } get limitUnit() { return this.getStringAttribute('limit_unit'); } set limitUnit(value) { this._limitUnit = value; } resetLimitUnit() { this._limitUnit = undefined; } // Temporarily expose input value. Use with caution. get limitUnitInput() { return this._limitUnit; } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } resetName() { this._name = undefined; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get namePrefix() { return this.getStringAttribute('name_prefix'); } set namePrefix(value) { this._namePrefix = value; } resetNamePrefix() { this._namePrefix = undefined; } // Temporarily expose input value. Use with caution. get namePrefixInput() { return this._namePrefix; } get tags() { return this.getStringMapAttribute('tags'); } set tags(value) { this._tags = value; } resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. get tagsInput() { return this._tags; } get tagsAll() { return this.getStringMapAttribute('tags_all'); } set tagsAll(value) { this._tagsAll = value; } resetTagsAll() { this._tagsAll = undefined; } // Temporarily expose input value. Use with caution. get tagsAllInput() { return this._tagsAll; } get timePeriodEnd() { return this.getStringAttribute('time_period_end'); } set timePeriodEnd(value) { this._timePeriodEnd = value; } resetTimePeriodEnd() { this._timePeriodEnd = undefined; } // Temporarily expose input value. Use with caution. get timePeriodEndInput() { return this._timePeriodEnd; } get timePeriodStart() { return this.getStringAttribute('time_period_start'); } set timePeriodStart(value) { this._timePeriodStart = value; } resetTimePeriodStart() { this._timePeriodStart = undefined; } // Temporarily expose input value. Use with caution. get timeP