UNPKG

@cdktf/provider-azurerm

Version:

Prebuilt azurerm Provider for Terraform CDK (cdktf)

1,198 lines (1,197 loc) 208 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j; Object.defineProperty(exports, "__esModule", { value: true }); exports.MonitorScheduledQueryRulesAlertV2 = exports.MonitorScheduledQueryRulesAlertV2TimeoutsOutputReference = exports.monitorScheduledQueryRulesAlertV2TimeoutsToHclTerraform = exports.monitorScheduledQueryRulesAlertV2TimeoutsToTerraform = exports.MonitorScheduledQueryRulesAlertV2IdentityOutputReference = exports.monitorScheduledQueryRulesAlertV2IdentityToHclTerraform = exports.monitorScheduledQueryRulesAlertV2IdentityToTerraform = exports.MonitorScheduledQueryRulesAlertV2CriteriaList = exports.MonitorScheduledQueryRulesAlertV2CriteriaOutputReference = exports.monitorScheduledQueryRulesAlertV2CriteriaToHclTerraform = exports.monitorScheduledQueryRulesAlertV2CriteriaToTerraform = exports.MonitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsOutputReference = exports.monitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsToHclTerraform = exports.monitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsToTerraform = exports.MonitorScheduledQueryRulesAlertV2CriteriaDimensionList = exports.MonitorScheduledQueryRulesAlertV2CriteriaDimensionOutputReference = exports.monitorScheduledQueryRulesAlertV2CriteriaDimensionToHclTerraform = exports.monitorScheduledQueryRulesAlertV2CriteriaDimensionToTerraform = exports.MonitorScheduledQueryRulesAlertV2ActionOutputReference = exports.monitorScheduledQueryRulesAlertV2ActionToHclTerraform = exports.monitorScheduledQueryRulesAlertV2ActionToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function monitorScheduledQueryRulesAlertV2ActionToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { action_groups: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.actionGroups), custom_properties: cdktf.hashMapper(cdktf.stringToTerraform)(struct.customProperties), }; } exports.monitorScheduledQueryRulesAlertV2ActionToTerraform = monitorScheduledQueryRulesAlertV2ActionToTerraform; function monitorScheduledQueryRulesAlertV2ActionToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { action_groups: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.actionGroups), isBlock: false, type: "list", storageClassType: "stringList", }, custom_properties: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.customProperties), isBlock: false, type: "map", storageClassType: "stringMap", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.monitorScheduledQueryRulesAlertV2ActionToHclTerraform = monitorScheduledQueryRulesAlertV2ActionToHclTerraform; class MonitorScheduledQueryRulesAlertV2ActionOutputReference 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._actionGroups !== undefined) { hasAnyValues = true; internalValueResult.actionGroups = this._actionGroups; } if (this._customProperties !== undefined) { hasAnyValues = true; internalValueResult.customProperties = this._customProperties; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._actionGroups = undefined; this._customProperties = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._actionGroups = value.actionGroups; this._customProperties = value.customProperties; } } get actionGroups() { return this.getListAttribute('action_groups'); } set actionGroups(value) { this._actionGroups = value; } resetActionGroups() { this._actionGroups = undefined; } // Temporarily expose input value. Use with caution. get actionGroupsInput() { return this._actionGroups; } get customProperties() { return this.getStringMapAttribute('custom_properties'); } set customProperties(value) { this._customProperties = value; } resetCustomProperties() { this._customProperties = undefined; } // Temporarily expose input value. Use with caution. get customPropertiesInput() { return this._customProperties; } } exports.MonitorScheduledQueryRulesAlertV2ActionOutputReference = MonitorScheduledQueryRulesAlertV2ActionOutputReference; _a = JSII_RTTI_SYMBOL_1; MonitorScheduledQueryRulesAlertV2ActionOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.monitorScheduledQueryRulesAlertV2.MonitorScheduledQueryRulesAlertV2ActionOutputReference", version: "12.27.0" }; function monitorScheduledQueryRulesAlertV2CriteriaDimensionToTerraform(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), operator: cdktf.stringToTerraform(struct.operator), values: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.values), }; } exports.monitorScheduledQueryRulesAlertV2CriteriaDimensionToTerraform = monitorScheduledQueryRulesAlertV2CriteriaDimensionToTerraform; function monitorScheduledQueryRulesAlertV2CriteriaDimensionToHclTerraform(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", }, operator: { value: cdktf.stringToHclTerraform(struct.operator), 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)); } exports.monitorScheduledQueryRulesAlertV2CriteriaDimensionToHclTerraform = monitorScheduledQueryRulesAlertV2CriteriaDimensionToHclTerraform; class MonitorScheduledQueryRulesAlertV2CriteriaDimensionOutputReference 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._operator !== undefined) { hasAnyValues = true; internalValueResult.operator = this._operator; } 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._operator = 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._operator = value.operator; 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 operator() { return this.getStringAttribute('operator'); } set operator(value) { this._operator = value; } // Temporarily expose input value. Use with caution. get operatorInput() { return this._operator; } 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.MonitorScheduledQueryRulesAlertV2CriteriaDimensionOutputReference = MonitorScheduledQueryRulesAlertV2CriteriaDimensionOutputReference; _b = JSII_RTTI_SYMBOL_1; MonitorScheduledQueryRulesAlertV2CriteriaDimensionOutputReference[_b] = { fqn: "@cdktf/provider-azurerm.monitorScheduledQueryRulesAlertV2.MonitorScheduledQueryRulesAlertV2CriteriaDimensionOutputReference", version: "12.27.0" }; class MonitorScheduledQueryRulesAlertV2CriteriaDimensionList 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 MonitorScheduledQueryRulesAlertV2CriteriaDimensionOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.MonitorScheduledQueryRulesAlertV2CriteriaDimensionList = MonitorScheduledQueryRulesAlertV2CriteriaDimensionList; _c = JSII_RTTI_SYMBOL_1; MonitorScheduledQueryRulesAlertV2CriteriaDimensionList[_c] = { fqn: "@cdktf/provider-azurerm.monitorScheduledQueryRulesAlertV2.MonitorScheduledQueryRulesAlertV2CriteriaDimensionList", version: "12.27.0" }; function monitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsToTerraform(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_failing_periods_to_trigger_alert: cdktf.numberToTerraform(struct.minimumFailingPeriodsToTriggerAlert), number_of_evaluation_periods: cdktf.numberToTerraform(struct.numberOfEvaluationPeriods), }; } exports.monitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsToTerraform = monitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsToTerraform; function monitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsToHclTerraform(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_failing_periods_to_trigger_alert: { value: cdktf.numberToHclTerraform(struct.minimumFailingPeriodsToTriggerAlert), isBlock: false, type: "simple", storageClassType: "number", }, number_of_evaluation_periods: { value: cdktf.numberToHclTerraform(struct.numberOfEvaluationPeriods), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.monitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsToHclTerraform = monitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsToHclTerraform; class MonitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsOutputReference 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._minimumFailingPeriodsToTriggerAlert !== undefined) { hasAnyValues = true; internalValueResult.minimumFailingPeriodsToTriggerAlert = this._minimumFailingPeriodsToTriggerAlert; } if (this._numberOfEvaluationPeriods !== undefined) { hasAnyValues = true; internalValueResult.numberOfEvaluationPeriods = this._numberOfEvaluationPeriods; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._minimumFailingPeriodsToTriggerAlert = undefined; this._numberOfEvaluationPeriods = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._minimumFailingPeriodsToTriggerAlert = value.minimumFailingPeriodsToTriggerAlert; this._numberOfEvaluationPeriods = value.numberOfEvaluationPeriods; } } get minimumFailingPeriodsToTriggerAlert() { return this.getNumberAttribute('minimum_failing_periods_to_trigger_alert'); } set minimumFailingPeriodsToTriggerAlert(value) { this._minimumFailingPeriodsToTriggerAlert = value; } // Temporarily expose input value. Use with caution. get minimumFailingPeriodsToTriggerAlertInput() { return this._minimumFailingPeriodsToTriggerAlert; } get numberOfEvaluationPeriods() { return this.getNumberAttribute('number_of_evaluation_periods'); } set numberOfEvaluationPeriods(value) { this._numberOfEvaluationPeriods = value; } // Temporarily expose input value. Use with caution. get numberOfEvaluationPeriodsInput() { return this._numberOfEvaluationPeriods; } } exports.MonitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsOutputReference = MonitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsOutputReference; _d = JSII_RTTI_SYMBOL_1; MonitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsOutputReference[_d] = { fqn: "@cdktf/provider-azurerm.monitorScheduledQueryRulesAlertV2.MonitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsOutputReference", version: "12.27.0" }; function monitorScheduledQueryRulesAlertV2CriteriaToTerraform(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 { metric_measure_column: cdktf.stringToTerraform(struct.metricMeasureColumn), operator: cdktf.stringToTerraform(struct.operator), query: cdktf.stringToTerraform(struct.query), resource_id_column: cdktf.stringToTerraform(struct.resourceIdColumn), threshold: cdktf.numberToTerraform(struct.threshold), time_aggregation_method: cdktf.stringToTerraform(struct.timeAggregationMethod), dimension: cdktf.listMapper(monitorScheduledQueryRulesAlertV2CriteriaDimensionToTerraform, true)(struct.dimension), failing_periods: monitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsToTerraform(struct.failingPeriods), }; } exports.monitorScheduledQueryRulesAlertV2CriteriaToTerraform = monitorScheduledQueryRulesAlertV2CriteriaToTerraform; function monitorScheduledQueryRulesAlertV2CriteriaToHclTerraform(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 = { metric_measure_column: { value: cdktf.stringToHclTerraform(struct.metricMeasureColumn), isBlock: false, type: "simple", storageClassType: "string", }, operator: { value: cdktf.stringToHclTerraform(struct.operator), isBlock: false, type: "simple", storageClassType: "string", }, query: { value: cdktf.stringToHclTerraform(struct.query), isBlock: false, type: "simple", storageClassType: "string", }, resource_id_column: { value: cdktf.stringToHclTerraform(struct.resourceIdColumn), isBlock: false, type: "simple", storageClassType: "string", }, threshold: { value: cdktf.numberToHclTerraform(struct.threshold), isBlock: false, type: "simple", storageClassType: "number", }, time_aggregation_method: { value: cdktf.stringToHclTerraform(struct.timeAggregationMethod), isBlock: false, type: "simple", storageClassType: "string", }, dimension: { value: cdktf.listMapperHcl(monitorScheduledQueryRulesAlertV2CriteriaDimensionToHclTerraform, true)(struct.dimension), isBlock: true, type: "list", storageClassType: "MonitorScheduledQueryRulesAlertV2CriteriaDimensionList", }, failing_periods: { value: monitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsToHclTerraform(struct.failingPeriods), isBlock: true, type: "list", storageClassType: "MonitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.monitorScheduledQueryRulesAlertV2CriteriaToHclTerraform = monitorScheduledQueryRulesAlertV2CriteriaToHclTerraform; class MonitorScheduledQueryRulesAlertV2CriteriaOutputReference 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; // dimension - computed: false, optional: true, required: false this._dimension = new MonitorScheduledQueryRulesAlertV2CriteriaDimensionList(this, "dimension", false); // failing_periods - computed: false, optional: true, required: false this._failingPeriods = new MonitorScheduledQueryRulesAlertV2CriteriaFailingPeriodsOutputReference(this, "failing_periods"); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._metricMeasureColumn !== undefined) { hasAnyValues = true; internalValueResult.metricMeasureColumn = this._metricMeasureColumn; } if (this._operator !== undefined) { hasAnyValues = true; internalValueResult.operator = this._operator; } if (this._query !== undefined) { hasAnyValues = true; internalValueResult.query = this._query; } if (this._resourceIdColumn !== undefined) { hasAnyValues = true; internalValueResult.resourceIdColumn = this._resourceIdColumn; } if (this._threshold !== undefined) { hasAnyValues = true; internalValueResult.threshold = this._threshold; } if (this._timeAggregationMethod !== undefined) { hasAnyValues = true; internalValueResult.timeAggregationMethod = this._timeAggregationMethod; } if (this._dimension?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.dimension = this._dimension?.internalValue; } if (this._failingPeriods?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.failingPeriods = this._failingPeriods?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._metricMeasureColumn = undefined; this._operator = undefined; this._query = undefined; this._resourceIdColumn = undefined; this._threshold = undefined; this._timeAggregationMethod = undefined; this._dimension.internalValue = undefined; this._failingPeriods.internalValue = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._metricMeasureColumn = value.metricMeasureColumn; this._operator = value.operator; this._query = value.query; this._resourceIdColumn = value.resourceIdColumn; this._threshold = value.threshold; this._timeAggregationMethod = value.timeAggregationMethod; this._dimension.internalValue = value.dimension; this._failingPeriods.internalValue = value.failingPeriods; } } get metricMeasureColumn() { return this.getStringAttribute('metric_measure_column'); } set metricMeasureColumn(value) { this._metricMeasureColumn = value; } resetMetricMeasureColumn() { this._metricMeasureColumn = undefined; } // Temporarily expose input value. Use with caution. get metricMeasureColumnInput() { return this._metricMeasureColumn; } get operator() { return this.getStringAttribute('operator'); } set operator(value) { this._operator = value; } // Temporarily expose input value. Use with caution. get operatorInput() { return this._operator; } get query() { return this.getStringAttribute('query'); } set query(value) { this._query = value; } // Temporarily expose input value. Use with caution. get queryInput() { return this._query; } get resourceIdColumn() { return this.getStringAttribute('resource_id_column'); } set resourceIdColumn(value) { this._resourceIdColumn = value; } resetResourceIdColumn() { this._resourceIdColumn = undefined; } // Temporarily expose input value. Use with caution. get resourceIdColumnInput() { return this._resourceIdColumn; } 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 timeAggregationMethod() { return this.getStringAttribute('time_aggregation_method'); } set timeAggregationMethod(value) { this._timeAggregationMethod = value; } // Temporarily expose input value. Use with caution. get timeAggregationMethodInput() { return this._timeAggregationMethod; } get dimension() { return this._dimension; } putDimension(value) { this._dimension.internalValue = value; } resetDimension() { this._dimension.internalValue = undefined; } // Temporarily expose input value. Use with caution. get dimensionInput() { return this._dimension.internalValue; } get failingPeriods() { return this._failingPeriods; } putFailingPeriods(value) { this._failingPeriods.internalValue = value; } resetFailingPeriods() { this._failingPeriods.internalValue = undefined; } // Temporarily expose input value. Use with caution. get failingPeriodsInput() { return this._failingPeriods.internalValue; } } exports.MonitorScheduledQueryRulesAlertV2CriteriaOutputReference = MonitorScheduledQueryRulesAlertV2CriteriaOutputReference; _e = JSII_RTTI_SYMBOL_1; MonitorScheduledQueryRulesAlertV2CriteriaOutputReference[_e] = { fqn: "@cdktf/provider-azurerm.monitorScheduledQueryRulesAlertV2.MonitorScheduledQueryRulesAlertV2CriteriaOutputReference", version: "12.27.0" }; class MonitorScheduledQueryRulesAlertV2CriteriaList 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 MonitorScheduledQueryRulesAlertV2CriteriaOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.MonitorScheduledQueryRulesAlertV2CriteriaList = MonitorScheduledQueryRulesAlertV2CriteriaList; _f = JSII_RTTI_SYMBOL_1; MonitorScheduledQueryRulesAlertV2CriteriaList[_f] = { fqn: "@cdktf/provider-azurerm.monitorScheduledQueryRulesAlertV2.MonitorScheduledQueryRulesAlertV2CriteriaList", version: "12.27.0" }; function monitorScheduledQueryRulesAlertV2IdentityToTerraform(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 { identity_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.identityIds), type: cdktf.stringToTerraform(struct.type), }; } exports.monitorScheduledQueryRulesAlertV2IdentityToTerraform = monitorScheduledQueryRulesAlertV2IdentityToTerraform; function monitorScheduledQueryRulesAlertV2IdentityToHclTerraform(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 = { identity_ids: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.identityIds), isBlock: false, type: "set", storageClassType: "stringList", }, 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.monitorScheduledQueryRulesAlertV2IdentityToHclTerraform = monitorScheduledQueryRulesAlertV2IdentityToHclTerraform; class MonitorScheduledQueryRulesAlertV2IdentityOutputReference 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._identityIds !== undefined) { hasAnyValues = true; internalValueResult.identityIds = this._identityIds; } if (this._type !== undefined) { hasAnyValues = true; internalValueResult.type = this._type; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._identityIds = undefined; this._type = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._identityIds = value.identityIds; this._type = value.type; } } get identityIds() { return cdktf.Fn.tolist(this.getListAttribute('identity_ids')); } set identityIds(value) { this._identityIds = value; } resetIdentityIds() { this._identityIds = undefined; } // Temporarily expose input value. Use with caution. get identityIdsInput() { return this._identityIds; } // principal_id - computed: true, optional: false, required: false get principalId() { return this.getStringAttribute('principal_id'); } // tenant_id - computed: true, optional: false, required: false get tenantId() { return this.getStringAttribute('tenant_id'); } 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.MonitorScheduledQueryRulesAlertV2IdentityOutputReference = MonitorScheduledQueryRulesAlertV2IdentityOutputReference; _g = JSII_RTTI_SYMBOL_1; MonitorScheduledQueryRulesAlertV2IdentityOutputReference[_g] = { fqn: "@cdktf/provider-azurerm.monitorScheduledQueryRulesAlertV2.MonitorScheduledQueryRulesAlertV2IdentityOutputReference", version: "12.27.0" }; function monitorScheduledQueryRulesAlertV2TimeoutsToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { create: cdktf.stringToTerraform(struct.create), delete: cdktf.stringToTerraform(struct.delete), read: cdktf.stringToTerraform(struct.read), update: cdktf.stringToTerraform(struct.update), }; } exports.monitorScheduledQueryRulesAlertV2TimeoutsToTerraform = monitorScheduledQueryRulesAlertV2TimeoutsToTerraform; function monitorScheduledQueryRulesAlertV2TimeoutsToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { create: { value: cdktf.stringToHclTerraform(struct.create), isBlock: false, type: "simple", storageClassType: "string", }, delete: { value: cdktf.stringToHclTerraform(struct.delete), isBlock: false, type: "simple", storageClassType: "string", }, read: { value: cdktf.stringToHclTerraform(struct.read), isBlock: false, type: "simple", storageClassType: "string", }, update: { value: cdktf.stringToHclTerraform(struct.update), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.monitorScheduledQueryRulesAlertV2TimeoutsToHclTerraform = monitorScheduledQueryRulesAlertV2TimeoutsToHclTerraform; class MonitorScheduledQueryRulesAlertV2TimeoutsOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._create !== undefined) { hasAnyValues = true; internalValueResult.create = this._create; } if (this._delete !== undefined) { hasAnyValues = true; internalValueResult.delete = this._delete; } if (this._read !== undefined) { hasAnyValues = true; internalValueResult.read = this._read; } if (this._update !== undefined) { hasAnyValues = true; internalValueResult.update = this._update; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._create = undefined; this._delete = undefined; this._read = undefined; this._update = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._create = value.create; this._delete = value.delete; this._read = value.read; this._update = value.update; } } get create() { return this.getStringAttribute('create'); } set create(value) { this._create = value; } resetCreate() { this._create = undefined; } // Temporarily expose input value. Use with caution. get createInput() { return this._create; } get delete() { return this.getStringAttribute('delete'); } set delete(value) { this._delete = value; } resetDelete() { this._delete = undefined; } // Temporarily expose input value. Use with caution. get deleteInput() { return this._delete; } get read() { return this.getStringAttribute('read'); } set read(value) { this._read = value; } resetRead() { this._read = undefined; } // Temporarily expose input value. Use with caution. get readInput() { return this._read; } get update() { return this.getStringAttribute('update'); } set update(value) { this._update = value; } resetUpdate() { this._update = undefined; } // Temporarily expose input value. Use with caution. get updateInput() { return this._update; } } exports.MonitorScheduledQueryRulesAlertV2TimeoutsOutputReference = MonitorScheduledQueryRulesAlertV2TimeoutsOutputReference; _h = JSII_RTTI_SYMBOL_1; MonitorScheduledQueryRulesAlertV2TimeoutsOutputReference[_h] = { fqn: "@cdktf/provider-azurerm.monitorScheduledQueryRulesAlertV2.MonitorScheduledQueryRulesAlertV2TimeoutsOutputReference", version: "12.27.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/monitor_scheduled_query_rules_alert_v2 azurerm_monitor_scheduled_query_rules_alert_v2} */ class MonitorScheduledQueryRulesAlertV2 extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a MonitorScheduledQueryRulesAlertV2 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 MonitorScheduledQueryRulesAlertV2 to import * @param importFromId The id of the existing MonitorScheduledQueryRulesAlertV2 that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/monitor_scheduled_query_rules_alert_v2#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the MonitorScheduledQueryRulesAlertV2 to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_monitor_scheduled_query_rules_alert_v2", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/monitor_scheduled_query_rules_alert_v2 azurerm_monitor_scheduled_query_rules_alert_v2} 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 MonitorScheduledQueryRulesAlertV2Config */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'azurerm_monitor_scheduled_query_rules_alert_v2', terraformGeneratorMetadata: { providerName: 'azurerm', providerVersion: '3.116.0', providerVersionConstraint: '~> 3.10' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); // action - computed: false, optional: true, required: false this._action = new MonitorScheduledQueryRulesAlertV2ActionOutputReference(this, "action"); // criteria - computed: false, optional: false, required: true this._criteria = new MonitorScheduledQueryRulesAlertV2CriteriaList(this, "criteria", false); // identity - computed: false, optional: true, required: false this._identity = new MonitorScheduledQueryRulesAlertV2IdentityOutputReference(this, "identity"); // timeouts - computed: false, optional: true, required: false this._timeouts = new MonitorScheduledQueryRulesAlertV2TimeoutsOutputReference(this, "timeouts"); this._autoMitigationEnabled = config.autoMitigationEnabled; this._description = config.description; this._displayName = config.displayName; this._enabled = config.enabled; this._evaluationFrequency = config.evaluationFrequency; this._id = config.id; this._location = config.location; this._muteActionsAfterAlertDuration = config.muteActionsAfterAlertDuration; this._name = config.name; this._queryTimeRangeOverride = config.queryTimeRangeOverride; this._resourceGroupName = config.resourceGroupName; this._scopes = config.scopes; this._severity = config.severity; this._skipQueryValidation = config.skipQueryValidation; this._tags = config.tags; this._targetResourceTypes = config.targetResourceTypes; this._windowDuration = config.windowDuration; this._workspaceAlertsStorageEnabled = config.workspaceAlertsStorageEnabled; this._action.internalValue = config.action; this._criteria.internalValue = config.criteria; this._identity.internalValue = config.identity; this._timeouts.internalValue = config.timeouts; } get autoMitigationEnabled() { return this.getBooleanAttribute('auto_mitigation_enabled'); } set autoMitigationEnabled(value) { this._autoMitigationEnabled = value; } resetAutoMitigationEnabled() { this._autoMitigationEnabled = undefined; } // Temporarily expose input value. Use with caution. get autoMitigationEnabledInput() { return this._autoMitigationEnabled; } // created_with_api_version - computed: true, optional: false, required: false get createdWithApiVersion() { return this.getStringAttribute('created_with_api_version'); } get description() { return this.getStringAttribute('description'); } set description(value) { this._description = value; } resetDescription() { this._description = undefined; } // Temporarily expose input value. Use with caution. get descriptionInput() { return this._description; } get displayName() { return this.getStringAttribute('display_name'); } set displayName(value) { this._displayName = value; } resetDisplayName() { this._displayName = undefined; } // Temporarily expose input value. Use with caution. get displayNameInput() { return this._displayName; } 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 evaluationFrequency() { return this.getStringAttribute('evaluation_frequency'); } set evaluationFrequency(value) { this._evaluationFrequency = value; } resetEvaluationFrequency() { this._evaluationFrequency = undefined; } // Temporarily expose input value. Use with caution. get evaluationFrequencyInput() { return this._evaluationFrequency; } 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; } // is_a_legacy_log_analytics_rule - computed: true, optional: false, required: false get isALegacyLogAnalyticsRule() { return this.getBooleanAttribute('is_a_legacy_log_analytics_rule'); } // is_workspace_alerts_storage_configured - computed: true, optional: false, required: false get isWorkspaceAlertsStorageConfigured() { return this.getBooleanAttribute('is_workspace_alerts_storage_configured'); } get location() { return this.getStringAttribute('location'); } set location(value) { this._location = value; } // Temporarily expose input value. Use with caution. get locationInput() { return this._location; } get muteActionsAfterAlertDuration() { return this.getStringAttribute('mute_actions_after_alert_duration'); } set muteActionsAfterAlertDuration(value) { this._muteActionsAfterAlertDuration = value; } resetMuteActionsAfterAlertDuration() { this._muteActionsAfterAlertDuration = undefined; } // Temporarily expose input value. Use with caution. get muteActionsAfterAlertDurationInput() { return this._muteActionsAfterAlertDuration; } 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 queryTimeRangeOverride() { return this.getStringAttribute('query_time_range_override'); } set queryTimeRangeOverride(value) { this._queryTimeRangeOverride = value; } resetQueryTimeRangeOverride() { this._queryTimeRangeOverride = undefined; } // Temporarily expose input value. Use with caution. get queryTimeRangeOverrideInput() { return this._queryTimeRangeOverride; } get resourceGroupName() { return this.getStringAttribute('resource_group_name'); } set resourceGroupName(value) { this._resourceGroupName = value; } // Temporarily expose input value. Use with caution. get resourceGroupNameInput() { return this._resourceGroupName; } get scopes() { return this.getListAttribute('scopes'); } set scopes(value) { this._scopes = value; } // Temporarily expose input value. Use with caution. get scopesInput() { return this._scopes; } get severity() { return this.getNumberAttribute('severity'); } set severity(value) { this._severity = value; } // Temporarily expose input value. Use with caution. get severityInput() { return this._severity; } get skipQueryValidation() { return this.getBooleanAttribute('skip_query_validation'); } set skipQueryValidation(value) { this._skipQueryValidation = value; } resetSkipQueryValidation() { this._skipQueryValidation = undefined; } // Temporarily expose input value. Use with caution. get skipQueryValidationInput() { return this._skipQueryValidation; } 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 targetResourceTypes() { return this.getListAttribute('target_resource_types'); } set targetResourceTypes(value) { this._targetResourceTypes = value; } resetTargetResourceTypes() { this._targetResourceTypes = undefined; } // Temporarily expose input value. Use with caution. get targetResourceTypesInput() { return this._targetResourceTypes; } get windowDuration() { return this.getStringAttribute('window_duration'); } set windowDuration(value) { this._windowDuration = value; } // Temporarily expose input value. Use with caution. get windowDurationInput() { return this._windowDuration;