@cdktf/provider-azurerm
Version:
Prebuilt azurerm Provider for Terraform CDK (cdktf)
1,293 lines (1,292 loc) • 202 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MonitorActivityLogAlert = exports.MonitorActivityLogAlertTimeoutsOutputReference = exports.monitorActivityLogAlertTimeoutsToHclTerraform = exports.monitorActivityLogAlertTimeoutsToTerraform = exports.MonitorActivityLogAlertCriteriaOutputReference = exports.monitorActivityLogAlertCriteriaToHclTerraform = exports.monitorActivityLogAlertCriteriaToTerraform = exports.MonitorActivityLogAlertCriteriaServiceHealthOutputReference = exports.monitorActivityLogAlertCriteriaServiceHealthToHclTerraform = exports.monitorActivityLogAlertCriteriaServiceHealthToTerraform = exports.MonitorActivityLogAlertCriteriaResourceHealthOutputReference = exports.monitorActivityLogAlertCriteriaResourceHealthToHclTerraform = exports.monitorActivityLogAlertCriteriaResourceHealthToTerraform = exports.MonitorActivityLogAlertActionList = exports.MonitorActivityLogAlertActionOutputReference = exports.monitorActivityLogAlertActionToHclTerraform = exports.monitorActivityLogAlertActionToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function monitorActivityLogAlertActionToTerraform(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_group_id: cdktf.stringToTerraform(struct.actionGroupId),
webhook_properties: cdktf.hashMapper(cdktf.stringToTerraform)(struct.webhookProperties),
};
}
exports.monitorActivityLogAlertActionToTerraform = monitorActivityLogAlertActionToTerraform;
function monitorActivityLogAlertActionToHclTerraform(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_group_id: {
value: cdktf.stringToHclTerraform(struct.actionGroupId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
webhook_properties: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.webhookProperties),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.monitorActivityLogAlertActionToHclTerraform = monitorActivityLogAlertActionToHclTerraform;
class MonitorActivityLogAlertActionOutputReference 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._actionGroupId !== undefined) {
hasAnyValues = true;
internalValueResult.actionGroupId = this._actionGroupId;
}
if (this._webhookProperties !== undefined) {
hasAnyValues = true;
internalValueResult.webhookProperties = this._webhookProperties;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._actionGroupId = undefined;
this._webhookProperties = 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._actionGroupId = value.actionGroupId;
this._webhookProperties = value.webhookProperties;
}
}
get actionGroupId() {
return this.getStringAttribute('action_group_id');
}
set actionGroupId(value) {
this._actionGroupId = value;
}
// Temporarily expose input value. Use with caution.
get actionGroupIdInput() {
return this._actionGroupId;
}
get webhookProperties() {
return this.getStringMapAttribute('webhook_properties');
}
set webhookProperties(value) {
this._webhookProperties = value;
}
resetWebhookProperties() {
this._webhookProperties = undefined;
}
// Temporarily expose input value. Use with caution.
get webhookPropertiesInput() {
return this._webhookProperties;
}
}
exports.MonitorActivityLogAlertActionOutputReference = MonitorActivityLogAlertActionOutputReference;
_a = JSII_RTTI_SYMBOL_1;
MonitorActivityLogAlertActionOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.monitorActivityLogAlert.MonitorActivityLogAlertActionOutputReference", version: "12.27.0" };
class MonitorActivityLogAlertActionList 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 MonitorActivityLogAlertActionOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.MonitorActivityLogAlertActionList = MonitorActivityLogAlertActionList;
_b = JSII_RTTI_SYMBOL_1;
MonitorActivityLogAlertActionList[_b] = { fqn: "@cdktf/provider-azurerm.monitorActivityLogAlert.MonitorActivityLogAlertActionList", version: "12.27.0" };
function monitorActivityLogAlertCriteriaResourceHealthToTerraform(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 {
current: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.current),
previous: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.previous),
reason: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.reason),
};
}
exports.monitorActivityLogAlertCriteriaResourceHealthToTerraform = monitorActivityLogAlertCriteriaResourceHealthToTerraform;
function monitorActivityLogAlertCriteriaResourceHealthToHclTerraform(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 = {
current: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.current),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
previous: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.previous),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
reason: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.reason),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.monitorActivityLogAlertCriteriaResourceHealthToHclTerraform = monitorActivityLogAlertCriteriaResourceHealthToHclTerraform;
class MonitorActivityLogAlertCriteriaResourceHealthOutputReference 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._current !== undefined) {
hasAnyValues = true;
internalValueResult.current = this._current;
}
if (this._previous !== undefined) {
hasAnyValues = true;
internalValueResult.previous = this._previous;
}
if (this._reason !== undefined) {
hasAnyValues = true;
internalValueResult.reason = this._reason;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._current = undefined;
this._previous = undefined;
this._reason = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._current = value.current;
this._previous = value.previous;
this._reason = value.reason;
}
}
get current() {
return cdktf.Fn.tolist(this.getListAttribute('current'));
}
set current(value) {
this._current = value;
}
resetCurrent() {
this._current = undefined;
}
// Temporarily expose input value. Use with caution.
get currentInput() {
return this._current;
}
get previous() {
return cdktf.Fn.tolist(this.getListAttribute('previous'));
}
set previous(value) {
this._previous = value;
}
resetPrevious() {
this._previous = undefined;
}
// Temporarily expose input value. Use with caution.
get previousInput() {
return this._previous;
}
get reason() {
return cdktf.Fn.tolist(this.getListAttribute('reason'));
}
set reason(value) {
this._reason = value;
}
resetReason() {
this._reason = undefined;
}
// Temporarily expose input value. Use with caution.
get reasonInput() {
return this._reason;
}
}
exports.MonitorActivityLogAlertCriteriaResourceHealthOutputReference = MonitorActivityLogAlertCriteriaResourceHealthOutputReference;
_c = JSII_RTTI_SYMBOL_1;
MonitorActivityLogAlertCriteriaResourceHealthOutputReference[_c] = { fqn: "@cdktf/provider-azurerm.monitorActivityLogAlert.MonitorActivityLogAlertCriteriaResourceHealthOutputReference", version: "12.27.0" };
function monitorActivityLogAlertCriteriaServiceHealthToTerraform(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 {
events: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.events),
locations: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.locations),
services: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.services),
};
}
exports.monitorActivityLogAlertCriteriaServiceHealthToTerraform = monitorActivityLogAlertCriteriaServiceHealthToTerraform;
function monitorActivityLogAlertCriteriaServiceHealthToHclTerraform(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 = {
events: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.events),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
locations: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.locations),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
services: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.services),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.monitorActivityLogAlertCriteriaServiceHealthToHclTerraform = monitorActivityLogAlertCriteriaServiceHealthToHclTerraform;
class MonitorActivityLogAlertCriteriaServiceHealthOutputReference 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._events !== undefined) {
hasAnyValues = true;
internalValueResult.events = this._events;
}
if (this._locations !== undefined) {
hasAnyValues = true;
internalValueResult.locations = this._locations;
}
if (this._services !== undefined) {
hasAnyValues = true;
internalValueResult.services = this._services;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._events = undefined;
this._locations = undefined;
this._services = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._events = value.events;
this._locations = value.locations;
this._services = value.services;
}
}
get events() {
return cdktf.Fn.tolist(this.getListAttribute('events'));
}
set events(value) {
this._events = value;
}
resetEvents() {
this._events = undefined;
}
// Temporarily expose input value. Use with caution.
get eventsInput() {
return this._events;
}
get locations() {
return cdktf.Fn.tolist(this.getListAttribute('locations'));
}
set locations(value) {
this._locations = value;
}
resetLocations() {
this._locations = undefined;
}
// Temporarily expose input value. Use with caution.
get locationsInput() {
return this._locations;
}
get services() {
return cdktf.Fn.tolist(this.getListAttribute('services'));
}
set services(value) {
this._services = value;
}
resetServices() {
this._services = undefined;
}
// Temporarily expose input value. Use with caution.
get servicesInput() {
return this._services;
}
}
exports.MonitorActivityLogAlertCriteriaServiceHealthOutputReference = MonitorActivityLogAlertCriteriaServiceHealthOutputReference;
_d = JSII_RTTI_SYMBOL_1;
MonitorActivityLogAlertCriteriaServiceHealthOutputReference[_d] = { fqn: "@cdktf/provider-azurerm.monitorActivityLogAlert.MonitorActivityLogAlertCriteriaServiceHealthOutputReference", version: "12.27.0" };
function monitorActivityLogAlertCriteriaToTerraform(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 {
caller: cdktf.stringToTerraform(struct.caller),
category: cdktf.stringToTerraform(struct.category),
level: cdktf.stringToTerraform(struct.level),
levels: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.levels),
operation_name: cdktf.stringToTerraform(struct.operationName),
recommendation_category: cdktf.stringToTerraform(struct.recommendationCategory),
recommendation_impact: cdktf.stringToTerraform(struct.recommendationImpact),
recommendation_type: cdktf.stringToTerraform(struct.recommendationType),
resource_group: cdktf.stringToTerraform(struct.resourceGroup),
resource_groups: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.resourceGroups),
resource_id: cdktf.stringToTerraform(struct.resourceId),
resource_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.resourceIds),
resource_provider: cdktf.stringToTerraform(struct.resourceProvider),
resource_providers: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.resourceProviders),
resource_type: cdktf.stringToTerraform(struct.resourceType),
resource_types: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.resourceTypes),
status: cdktf.stringToTerraform(struct.status),
statuses: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.statuses),
sub_status: cdktf.stringToTerraform(struct.subStatus),
sub_statuses: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.subStatuses),
resource_health: monitorActivityLogAlertCriteriaResourceHealthToTerraform(struct.resourceHealth),
service_health: monitorActivityLogAlertCriteriaServiceHealthToTerraform(struct.serviceHealth),
};
}
exports.monitorActivityLogAlertCriteriaToTerraform = monitorActivityLogAlertCriteriaToTerraform;
function monitorActivityLogAlertCriteriaToHclTerraform(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 = {
caller: {
value: cdktf.stringToHclTerraform(struct.caller),
isBlock: false,
type: "simple",
storageClassType: "string",
},
category: {
value: cdktf.stringToHclTerraform(struct.category),
isBlock: false,
type: "simple",
storageClassType: "string",
},
level: {
value: cdktf.stringToHclTerraform(struct.level),
isBlock: false,
type: "simple",
storageClassType: "string",
},
levels: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.levels),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
operation_name: {
value: cdktf.stringToHclTerraform(struct.operationName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
recommendation_category: {
value: cdktf.stringToHclTerraform(struct.recommendationCategory),
isBlock: false,
type: "simple",
storageClassType: "string",
},
recommendation_impact: {
value: cdktf.stringToHclTerraform(struct.recommendationImpact),
isBlock: false,
type: "simple",
storageClassType: "string",
},
recommendation_type: {
value: cdktf.stringToHclTerraform(struct.recommendationType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
resource_group: {
value: cdktf.stringToHclTerraform(struct.resourceGroup),
isBlock: false,
type: "simple",
storageClassType: "string",
},
resource_groups: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.resourceGroups),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
resource_id: {
value: cdktf.stringToHclTerraform(struct.resourceId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
resource_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.resourceIds),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
resource_provider: {
value: cdktf.stringToHclTerraform(struct.resourceProvider),
isBlock: false,
type: "simple",
storageClassType: "string",
},
resource_providers: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.resourceProviders),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
resource_type: {
value: cdktf.stringToHclTerraform(struct.resourceType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
resource_types: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.resourceTypes),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
status: {
value: cdktf.stringToHclTerraform(struct.status),
isBlock: false,
type: "simple",
storageClassType: "string",
},
statuses: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.statuses),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
sub_status: {
value: cdktf.stringToHclTerraform(struct.subStatus),
isBlock: false,
type: "simple",
storageClassType: "string",
},
sub_statuses: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.subStatuses),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
resource_health: {
value: monitorActivityLogAlertCriteriaResourceHealthToHclTerraform(struct.resourceHealth),
isBlock: true,
type: "list",
storageClassType: "MonitorActivityLogAlertCriteriaResourceHealthList",
},
service_health: {
value: monitorActivityLogAlertCriteriaServiceHealthToHclTerraform(struct.serviceHealth),
isBlock: true,
type: "list",
storageClassType: "MonitorActivityLogAlertCriteriaServiceHealthList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.monitorActivityLogAlertCriteriaToHclTerraform = monitorActivityLogAlertCriteriaToHclTerraform;
class MonitorActivityLogAlertCriteriaOutputReference 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;
// resource_health - computed: false, optional: true, required: false
this._resourceHealth = new MonitorActivityLogAlertCriteriaResourceHealthOutputReference(this, "resource_health");
// service_health - computed: false, optional: true, required: false
this._serviceHealth = new MonitorActivityLogAlertCriteriaServiceHealthOutputReference(this, "service_health");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._caller !== undefined) {
hasAnyValues = true;
internalValueResult.caller = this._caller;
}
if (this._category !== undefined) {
hasAnyValues = true;
internalValueResult.category = this._category;
}
if (this._level !== undefined) {
hasAnyValues = true;
internalValueResult.level = this._level;
}
if (this._levels !== undefined) {
hasAnyValues = true;
internalValueResult.levels = this._levels;
}
if (this._operationName !== undefined) {
hasAnyValues = true;
internalValueResult.operationName = this._operationName;
}
if (this._recommendationCategory !== undefined) {
hasAnyValues = true;
internalValueResult.recommendationCategory = this._recommendationCategory;
}
if (this._recommendationImpact !== undefined) {
hasAnyValues = true;
internalValueResult.recommendationImpact = this._recommendationImpact;
}
if (this._recommendationType !== undefined) {
hasAnyValues = true;
internalValueResult.recommendationType = this._recommendationType;
}
if (this._resourceGroup !== undefined) {
hasAnyValues = true;
internalValueResult.resourceGroup = this._resourceGroup;
}
if (this._resourceGroups !== undefined) {
hasAnyValues = true;
internalValueResult.resourceGroups = this._resourceGroups;
}
if (this._resourceId !== undefined) {
hasAnyValues = true;
internalValueResult.resourceId = this._resourceId;
}
if (this._resourceIds !== undefined) {
hasAnyValues = true;
internalValueResult.resourceIds = this._resourceIds;
}
if (this._resourceProvider !== undefined) {
hasAnyValues = true;
internalValueResult.resourceProvider = this._resourceProvider;
}
if (this._resourceProviders !== undefined) {
hasAnyValues = true;
internalValueResult.resourceProviders = this._resourceProviders;
}
if (this._resourceType !== undefined) {
hasAnyValues = true;
internalValueResult.resourceType = this._resourceType;
}
if (this._resourceTypes !== undefined) {
hasAnyValues = true;
internalValueResult.resourceTypes = this._resourceTypes;
}
if (this._status !== undefined) {
hasAnyValues = true;
internalValueResult.status = this._status;
}
if (this._statuses !== undefined) {
hasAnyValues = true;
internalValueResult.statuses = this._statuses;
}
if (this._subStatus !== undefined) {
hasAnyValues = true;
internalValueResult.subStatus = this._subStatus;
}
if (this._subStatuses !== undefined) {
hasAnyValues = true;
internalValueResult.subStatuses = this._subStatuses;
}
if (this._resourceHealth?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.resourceHealth = this._resourceHealth?.internalValue;
}
if (this._serviceHealth?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.serviceHealth = this._serviceHealth?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._caller = undefined;
this._category = undefined;
this._level = undefined;
this._levels = undefined;
this._operationName = undefined;
this._recommendationCategory = undefined;
this._recommendationImpact = undefined;
this._recommendationType = undefined;
this._resourceGroup = undefined;
this._resourceGroups = undefined;
this._resourceId = undefined;
this._resourceIds = undefined;
this._resourceProvider = undefined;
this._resourceProviders = undefined;
this._resourceType = undefined;
this._resourceTypes = undefined;
this._status = undefined;
this._statuses = undefined;
this._subStatus = undefined;
this._subStatuses = undefined;
this._resourceHealth.internalValue = undefined;
this._serviceHealth.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._caller = value.caller;
this._category = value.category;
this._level = value.level;
this._levels = value.levels;
this._operationName = value.operationName;
this._recommendationCategory = value.recommendationCategory;
this._recommendationImpact = value.recommendationImpact;
this._recommendationType = value.recommendationType;
this._resourceGroup = value.resourceGroup;
this._resourceGroups = value.resourceGroups;
this._resourceId = value.resourceId;
this._resourceIds = value.resourceIds;
this._resourceProvider = value.resourceProvider;
this._resourceProviders = value.resourceProviders;
this._resourceType = value.resourceType;
this._resourceTypes = value.resourceTypes;
this._status = value.status;
this._statuses = value.statuses;
this._subStatus = value.subStatus;
this._subStatuses = value.subStatuses;
this._resourceHealth.internalValue = value.resourceHealth;
this._serviceHealth.internalValue = value.serviceHealth;
}
}
get caller() {
return this.getStringAttribute('caller');
}
set caller(value) {
this._caller = value;
}
resetCaller() {
this._caller = undefined;
}
// Temporarily expose input value. Use with caution.
get callerInput() {
return this._caller;
}
get category() {
return this.getStringAttribute('category');
}
set category(value) {
this._category = value;
}
// Temporarily expose input value. Use with caution.
get categoryInput() {
return this._category;
}
get level() {
return this.getStringAttribute('level');
}
set level(value) {
this._level = value;
}
resetLevel() {
this._level = undefined;
}
// Temporarily expose input value. Use with caution.
get levelInput() {
return this._level;
}
get levels() {
return this.getListAttribute('levels');
}
set levels(value) {
this._levels = value;
}
resetLevels() {
this._levels = undefined;
}
// Temporarily expose input value. Use with caution.
get levelsInput() {
return this._levels;
}
get operationName() {
return this.getStringAttribute('operation_name');
}
set operationName(value) {
this._operationName = value;
}
resetOperationName() {
this._operationName = undefined;
}
// Temporarily expose input value. Use with caution.
get operationNameInput() {
return this._operationName;
}
get recommendationCategory() {
return this.getStringAttribute('recommendation_category');
}
set recommendationCategory(value) {
this._recommendationCategory = value;
}
resetRecommendationCategory() {
this._recommendationCategory = undefined;
}
// Temporarily expose input value. Use with caution.
get recommendationCategoryInput() {
return this._recommendationCategory;
}
get recommendationImpact() {
return this.getStringAttribute('recommendation_impact');
}
set recommendationImpact(value) {
this._recommendationImpact = value;
}
resetRecommendationImpact() {
this._recommendationImpact = undefined;
}
// Temporarily expose input value. Use with caution.
get recommendationImpactInput() {
return this._recommendationImpact;
}
get recommendationType() {
return this.getStringAttribute('recommendation_type');
}
set recommendationType(value) {
this._recommendationType = value;
}
resetRecommendationType() {
this._recommendationType = undefined;
}
// Temporarily expose input value. Use with caution.
get recommendationTypeInput() {
return this._recommendationType;
}
get resourceGroup() {
return this.getStringAttribute('resource_group');
}
set resourceGroup(value) {
this._resourceGroup = value;
}
resetResourceGroup() {
this._resourceGroup = undefined;
}
// Temporarily expose input value. Use with caution.
get resourceGroupInput() {
return this._resourceGroup;
}
get resourceGroups() {
return this.getListAttribute('resource_groups');
}
set resourceGroups(value) {
this._resourceGroups = value;
}
resetResourceGroups() {
this._resourceGroups = undefined;
}
// Temporarily expose input value. Use with caution.
get resourceGroupsInput() {
return this._resourceGroups;
}
get resourceId() {
return this.getStringAttribute('resource_id');
}
set resourceId(value) {
this._resourceId = value;
}
resetResourceId() {
this._resourceId = undefined;
}
// Temporarily expose input value. Use with caution.
get resourceIdInput() {
return this._resourceId;
}
get resourceIds() {
return this.getListAttribute('resource_ids');
}
set resourceIds(value) {
this._resourceIds = value;
}
resetResourceIds() {
this._resourceIds = undefined;
}
// Temporarily expose input value. Use with caution.
get resourceIdsInput() {
return this._resourceIds;
}
get resourceProvider() {
return this.getStringAttribute('resource_provider');
}
set resourceProvider(value) {
this._resourceProvider = value;
}
resetResourceProvider() {
this._resourceProvider = undefined;
}
// Temporarily expose input value. Use with caution.
get resourceProviderInput() {
return this._resourceProvider;
}
get resourceProviders() {
return this.getListAttribute('resource_providers');
}
set resourceProviders(value) {
this._resourceProviders = value;
}
resetResourceProviders() {
this._resourceProviders = undefined;
}
// Temporarily expose input value. Use with caution.
get resourceProvidersInput() {
return this._resourceProviders;
}
get resourceType() {
return this.getStringAttribute('resource_type');
}
set resourceType(value) {
this._resourceType = value;
}
resetResourceType() {
this._resourceType = undefined;
}
// Temporarily expose input value. Use with caution.
get resourceTypeInput() {
return this._resourceType;
}
get resourceTypes() {
return this.getListAttribute('resource_types');
}
set resourceTypes(value) {
this._resourceTypes = value;
}
resetResourceTypes() {
this._resourceTypes = undefined;
}
// Temporarily expose input value. Use with caution.
get resourceTypesInput() {
return this._resourceTypes;
}
get status() {
return this.getStringAttribute('status');
}
set status(value) {
this._status = value;
}
resetStatus() {
this._status = undefined;
}
// Temporarily expose input value. Use with caution.
get statusInput() {
return this._status;
}
get statuses() {
return this.getListAttribute('statuses');
}
set statuses(value) {
this._statuses = value;
}
resetStatuses() {
this._statuses = undefined;
}
// Temporarily expose input value. Use with caution.
get statusesInput() {
return this._statuses;
}
get subStatus() {
return this.getStringAttribute('sub_status');
}
set subStatus(value) {
this._subStatus = value;
}
resetSubStatus() {
this._subStatus = undefined;
}
// Temporarily expose input value. Use with caution.
get subStatusInput() {
return this._subStatus;
}
get subStatuses() {
return this.getListAttribute('sub_statuses');
}
set subStatuses(value) {
this._subStatuses = value;
}
resetSubStatuses() {
this._subStatuses = undefined;
}
// Temporarily expose input value. Use with caution.
get subStatusesInput() {
return this._subStatuses;
}
get resourceHealth() {
return this._resourceHealth;
}
putResourceHealth(value) {
this._resourceHealth.internalValue = value;
}
resetResourceHealth() {
this._resourceHealth.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get resourceHealthInput() {
return this._resourceHealth.internalValue;
}
get serviceHealth() {
return this._serviceHealth;
}
putServiceHealth(value) {
this._serviceHealth.internalValue = value;
}
resetServiceHealth() {
this._serviceHealth.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get serviceHealthInput() {
return this._serviceHealth.internalValue;
}
}
exports.MonitorActivityLogAlertCriteriaOutputReference = MonitorActivityLogAlertCriteriaOutputReference;
_e = JSII_RTTI_SYMBOL_1;
MonitorActivityLogAlertCriteriaOutputReference[_e] = { fqn: "@cdktf/provider-azurerm.monitorActivityLogAlert.MonitorActivityLogAlertCriteriaOutputReference", version: "12.27.0" };
function monitorActivityLogAlertTimeoutsToTerraform(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.monitorActivityLogAlertTimeoutsToTerraform = monitorActivityLogAlertTimeoutsToTerraform;
function monitorActivityLogAlertTimeoutsToHclTerraform(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.monitorActivityLogAlertTimeoutsToHclTerraform = monitorActivityLogAlertTimeoutsToHclTerraform;
class MonitorActivityLogAlertTimeoutsOutputReference 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.MonitorActivityLogAlertTimeoutsOutputReference = MonitorActivityLogAlertTimeoutsOutputReference;
_f = JSII_RTTI_SYMBOL_1;
MonitorActivityLogAlertTimeoutsOutputReference[_f] = { fqn: "@cdktf/provider-azurerm.monitorActivityLogAlert.MonitorActivityLogAlertTimeoutsOutputReference", version: "12.27.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/monitor_activity_log_alert azurerm_monitor_activity_log_alert}
*/
class MonitorActivityLogAlert extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a MonitorActivityLogAlert 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 MonitorActivityLogAlert to import
* @param importFromId The id of the existing MonitorActivityLogAlert that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/monitor_activity_log_alert#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the MonitorActivityLogAlert to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_monitor_activity_log_alert", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/monitor_activity_log_alert azurerm_monitor_activity_log_alert} 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 MonitorActivityLogAlertConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'azurerm_monitor_activity_log_alert',
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 MonitorActivityLogAlertActionList(this, "action", false);
// criteria - computed: false, optional: false, required: true
this._criteria = new MonitorActivityLogAlertCriteriaOutputReference(this, "criteria");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new MonitorActivityLogAlertTimeoutsOutputReference(this, "timeouts");
this._description = config.description;
this._enabled = config.enabled;
this._id = config.id;
this._location = config.location;
this._name = config.name;
this._resourceGroupName = config.resourceGroupName;
this._scopes = config.scopes;
this._tags = config.tags;
this._action.internalValue = config.action;
this._criteria.internalValue = config.criteria;
this._timeouts.internalValue = config.timeouts;
}
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 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 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 location() {
return this.getStringAttribute('location');
}
set location(value) {
this._location = value;
}
resetLocation() {
this._location = undefined;
}
// Temporarily expose input value. Use with caution.
get locationInput() {
return this._location;