@microsoft/terraform-cdk-constructs 1.0.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +89270 -15866
- package/API.md +103201 -10557
- package/README.md +72 -36
- package/docs/monitoring-guide.md +206 -0
- package/docs/testing.md +84 -1
- package/lib/azure-actiongroup/index.d.ts +1 -0
- package/lib/azure-actiongroup/index.js +18 -0
- package/lib/azure-actiongroup/lib/action-group-schemas.d.ts +24 -0
- package/lib/azure-actiongroup/lib/action-group-schemas.js +201 -0
- package/lib/azure-actiongroup/lib/action-group.d.ts +302 -0
- package/lib/azure-actiongroup/lib/action-group.js +175 -0
- package/lib/azure-actiongroup/lib/index.d.ts +2 -0
- package/lib/azure-actiongroup/lib/index.js +19 -0
- package/lib/azure-actiongroup/test/action-group.integ.d.ts +9 -0
- package/lib/azure-actiongroup/test/action-group.integ.js +79 -0
- package/lib/azure-actiongroup/test/action-group.spec.d.ts +8 -0
- package/lib/azure-actiongroup/test/action-group.spec.js +602 -0
- package/lib/azure-activitylogalert/index.d.ts +1 -0
- package/lib/azure-activitylogalert/index.js +18 -0
- package/lib/azure-activitylogalert/lib/activity-log-alert-schemas.d.ts +24 -0
- package/lib/azure-activitylogalert/lib/activity-log-alert-schemas.js +182 -0
- package/lib/azure-activitylogalert/lib/activity-log-alert.d.ts +226 -0
- package/lib/azure-activitylogalert/lib/activity-log-alert.js +186 -0
- package/lib/azure-activitylogalert/lib/index.d.ts +2 -0
- package/lib/azure-activitylogalert/lib/index.js +19 -0
- package/lib/azure-activitylogalert/test/activity-log-alert.integ.d.ts +9 -0
- package/lib/azure-activitylogalert/test/activity-log-alert.integ.js +98 -0
- package/lib/azure-activitylogalert/test/activity-log-alert.spec.d.ts +9 -0
- package/lib/azure-activitylogalert/test/activity-log-alert.spec.js +1101 -0
- package/lib/azure-aks/index.d.ts +1 -0
- package/lib/azure-aks/index.js +18 -0
- package/lib/azure-aks/lib/aks-cluster-schemas.d.ts +505 -0
- package/lib/azure-aks/lib/aks-cluster-schemas.js +572 -0
- package/lib/azure-aks/lib/aks-cluster.d.ts +386 -0
- package/lib/azure-aks/lib/aks-cluster.js +466 -0
- package/lib/azure-aks/lib/index.d.ts +2 -0
- package/lib/azure-aks/lib/index.js +19 -0
- package/lib/azure-aks/test/aks-cluster.integ.d.ts +9 -0
- package/lib/azure-aks/test/aks-cluster.integ.js +260 -0
- package/lib/azure-aks/test/aks-cluster.spec.d.ts +8 -0
- package/lib/azure-aks/test/aks-cluster.spec.js +1396 -0
- package/lib/azure-diagnosticsettings/index.d.ts +1 -0
- package/lib/azure-diagnosticsettings/index.js +18 -0
- package/lib/azure-diagnosticsettings/lib/diagnostic-settings-schemas.d.ts +50 -0
- package/lib/azure-diagnosticsettings/lib/diagnostic-settings-schemas.js +207 -0
- package/lib/azure-diagnosticsettings/lib/diagnostic-settings.d.ts +183 -0
- package/lib/azure-diagnosticsettings/lib/diagnostic-settings.js +174 -0
- package/lib/azure-diagnosticsettings/lib/index.d.ts +2 -0
- package/lib/azure-diagnosticsettings/lib/index.js +19 -0
- package/lib/azure-diagnosticsettings/test/diagnostic-settings.spec.d.ts +8 -0
- package/lib/azure-diagnosticsettings/test/diagnostic-settings.spec.js +432 -0
- package/lib/azure-dnsforwardingruleset/index.d.ts +1 -0
- package/lib/azure-dnsforwardingruleset/index.js +18 -0
- package/lib/azure-dnsforwardingruleset/lib/dns-forwarding-ruleset-schemas.d.ts +24 -0
- package/lib/azure-dnsforwardingruleset/lib/dns-forwarding-ruleset-schemas.js +206 -0
- package/lib/azure-dnsforwardingruleset/lib/dns-forwarding-ruleset.d.ts +174 -0
- package/lib/azure-dnsforwardingruleset/lib/dns-forwarding-ruleset.js +214 -0
- package/lib/azure-dnsforwardingruleset/lib/forwarding-rule-schemas.d.ts +24 -0
- package/lib/azure-dnsforwardingruleset/lib/forwarding-rule-schemas.js +242 -0
- package/lib/azure-dnsforwardingruleset/lib/forwarding-rule.d.ts +193 -0
- package/lib/azure-dnsforwardingruleset/lib/forwarding-rule.js +193 -0
- package/lib/azure-dnsforwardingruleset/lib/index.d.ts +6 -0
- package/lib/azure-dnsforwardingruleset/lib/index.js +23 -0
- package/lib/azure-dnsforwardingruleset/lib/virtual-network-link-schemas.d.ts +24 -0
- package/lib/azure-dnsforwardingruleset/lib/virtual-network-link-schemas.js +199 -0
- package/lib/azure-dnsforwardingruleset/lib/virtual-network-link.d.ts +160 -0
- package/lib/azure-dnsforwardingruleset/lib/virtual-network-link.js +178 -0
- package/lib/azure-dnsforwardingruleset/test/dns-forwarding-ruleset.integ.d.ts +9 -0
- package/lib/azure-dnsforwardingruleset/test/dns-forwarding-ruleset.integ.js +133 -0
- package/lib/azure-dnsforwardingruleset/test/dns-forwarding-ruleset.spec.d.ts +9 -0
- package/lib/azure-dnsforwardingruleset/test/dns-forwarding-ruleset.spec.js +350 -0
- package/lib/azure-dnsforwardingruleset/test/forwarding-rule.spec.d.ts +9 -0
- package/lib/azure-dnsforwardingruleset/test/forwarding-rule.spec.js +397 -0
- package/lib/azure-dnsforwardingruleset/test/virtual-network-link.spec.d.ts +9 -0
- package/lib/azure-dnsforwardingruleset/test/virtual-network-link.spec.js +285 -0
- package/lib/azure-dnsresolver/index.d.ts +1 -0
- package/lib/azure-dnsresolver/index.js +18 -0
- package/lib/azure-dnsresolver/lib/dns-resolver-schemas.d.ts +24 -0
- package/lib/azure-dnsresolver/lib/dns-resolver-schemas.js +218 -0
- package/lib/azure-dnsresolver/lib/dns-resolver.d.ts +170 -0
- package/lib/azure-dnsresolver/lib/dns-resolver.js +236 -0
- package/lib/azure-dnsresolver/lib/inbound-endpoint-schemas.d.ts +24 -0
- package/lib/azure-dnsresolver/lib/inbound-endpoint-schemas.js +261 -0
- package/lib/azure-dnsresolver/lib/inbound-endpoint.d.ts +189 -0
- package/lib/azure-dnsresolver/lib/inbound-endpoint.js +243 -0
- package/lib/azure-dnsresolver/lib/index.d.ts +6 -0
- package/lib/azure-dnsresolver/lib/index.js +23 -0
- package/lib/azure-dnsresolver/lib/outbound-endpoint-schemas.d.ts +24 -0
- package/lib/azure-dnsresolver/lib/outbound-endpoint-schemas.js +231 -0
- package/lib/azure-dnsresolver/lib/outbound-endpoint.d.ts +175 -0
- package/lib/azure-dnsresolver/lib/outbound-endpoint.js +234 -0
- package/lib/azure-dnsresolver/test/dns-resolver.integ.d.ts +14 -0
- package/lib/azure-dnsresolver/test/dns-resolver.integ.js +117 -0
- package/lib/azure-dnsresolver/test/dns-resolver.spec.d.ts +9 -0
- package/lib/azure-dnsresolver/test/dns-resolver.spec.js +353 -0
- package/lib/azure-dnsresolver/test/inbound-endpoint.integ.d.ts +9 -0
- package/lib/azure-dnsresolver/test/inbound-endpoint.integ.js +151 -0
- package/lib/azure-dnsresolver/test/inbound-endpoint.spec.d.ts +9 -0
- package/lib/azure-dnsresolver/test/inbound-endpoint.spec.js +441 -0
- package/lib/azure-dnsresolver/test/outbound-endpoint.integ.d.ts +9 -0
- package/lib/azure-dnsresolver/test/outbound-endpoint.integ.js +149 -0
- package/lib/azure-dnsresolver/test/outbound-endpoint.spec.d.ts +9 -0
- package/lib/azure-dnsresolver/test/outbound-endpoint.spec.js +301 -0
- package/lib/azure-dnszone/index.d.ts +1 -0
- package/lib/azure-dnszone/index.js +18 -0
- package/lib/azure-dnszone/lib/dns-zone-schemas.d.ts +24 -0
- package/lib/azure-dnszone/lib/dns-zone-schemas.js +191 -0
- package/lib/azure-dnszone/lib/dns-zone.d.ts +182 -0
- package/lib/azure-dnszone/lib/dns-zone.js +228 -0
- package/lib/azure-dnszone/lib/index.d.ts +2 -0
- package/lib/azure-dnszone/lib/index.js +19 -0
- package/lib/azure-dnszone/test/dns-zone.integ.d.ts +9 -0
- package/lib/azure-dnszone/test/dns-zone.integ.js +85 -0
- package/lib/azure-dnszone/test/dns-zone.spec.d.ts +9 -0
- package/lib/azure-dnszone/test/dns-zone.spec.js +285 -0
- package/lib/azure-metricalert/index.d.ts +1 -0
- package/lib/azure-metricalert/index.js +18 -0
- package/lib/azure-metricalert/lib/index.d.ts +2 -0
- package/lib/azure-metricalert/lib/index.js +19 -0
- package/lib/azure-metricalert/lib/metric-alert-schemas.d.ts +24 -0
- package/lib/azure-metricalert/lib/metric-alert-schemas.js +242 -0
- package/lib/azure-metricalert/lib/metric-alert.d.ts +334 -0
- package/lib/azure-metricalert/lib/metric-alert.js +226 -0
- package/lib/azure-metricalert/test/metric-alert.integ.d.ts +9 -0
- package/lib/azure-metricalert/test/metric-alert.integ.js +123 -0
- package/lib/azure-metricalert/test/metric-alert.spec.d.ts +9 -0
- package/lib/azure-metricalert/test/metric-alert.spec.js +1266 -0
- package/lib/azure-networkinterface/index.d.ts +1 -0
- package/lib/azure-networkinterface/index.js +18 -0
- package/lib/azure-networkinterface/lib/index.d.ts +2 -0
- package/lib/azure-networkinterface/lib/index.js +19 -0
- package/lib/azure-networkinterface/lib/network-interface-schemas.d.ts +32 -0
- package/lib/azure-networkinterface/lib/network-interface-schemas.js +222 -0
- package/lib/azure-networkinterface/lib/network-interface.d.ts +260 -0
- package/lib/azure-networkinterface/lib/network-interface.js +213 -0
- package/lib/azure-networkinterface/test/network-interface.integ.d.ts +9 -0
- package/lib/azure-networkinterface/test/network-interface.integ.js +116 -0
- package/lib/azure-networkinterface/test/network-interface.spec.d.ts +8 -0
- package/lib/azure-networkinterface/test/network-interface.spec.js +655 -0
- package/lib/azure-networksecuritygroup/index.d.ts +1 -0
- package/lib/azure-networksecuritygroup/index.js +18 -0
- package/lib/azure-networksecuritygroup/lib/index.d.ts +2 -0
- package/lib/azure-networksecuritygroup/lib/index.js +19 -0
- package/lib/azure-networksecuritygroup/lib/network-security-group-schemas.d.ts +32 -0
- package/lib/azure-networksecuritygroup/lib/network-security-group-schemas.js +198 -0
- package/lib/azure-networksecuritygroup/lib/network-security-group.d.ts +259 -0
- package/lib/azure-networksecuritygroup/lib/network-security-group.js +226 -0
- package/lib/azure-networksecuritygroup/test/network-security-group.integ.d.ts +9 -0
- package/lib/azure-networksecuritygroup/test/network-security-group.integ.js +151 -0
- package/lib/azure-networksecuritygroup/test/network-security-group.spec.d.ts +8 -0
- package/lib/azure-networksecuritygroup/test/network-security-group.spec.js +652 -0
- package/lib/azure-policyassignment/index.d.ts +1 -0
- package/lib/azure-policyassignment/index.js +18 -0
- package/lib/azure-policyassignment/lib/index.d.ts +2 -0
- package/lib/azure-policyassignment/lib/index.js +19 -0
- package/lib/azure-policyassignment/lib/policy-assignment-schemas.d.ts +25 -0
- package/lib/azure-policyassignment/lib/policy-assignment-schemas.js +260 -0
- package/lib/azure-policyassignment/lib/policy-assignment.d.ts +342 -0
- package/lib/azure-policyassignment/lib/policy-assignment.js +228 -0
- package/lib/azure-policyassignment/test/policy-assignment.integ.d.ts +13 -0
- package/lib/azure-policyassignment/test/policy-assignment.integ.js +153 -0
- package/lib/azure-policyassignment/test/policy-assignment.spec.d.ts +9 -0
- package/lib/azure-policyassignment/test/policy-assignment.spec.js +651 -0
- package/lib/azure-policydefinition/index.d.ts +1 -0
- package/lib/azure-policydefinition/index.js +18 -0
- package/lib/azure-policydefinition/lib/index.d.ts +2 -0
- package/lib/azure-policydefinition/lib/index.js +19 -0
- package/lib/azure-policydefinition/lib/policy-definition-schemas.d.ts +25 -0
- package/lib/azure-policydefinition/lib/policy-definition-schemas.js +210 -0
- package/lib/azure-policydefinition/lib/policy-definition.d.ts +260 -0
- package/lib/azure-policydefinition/lib/policy-definition.js +199 -0
- package/lib/azure-policydefinition/test/policy-definition.integ.d.ts +9 -0
- package/lib/azure-policydefinition/test/policy-definition.integ.js +137 -0
- package/lib/azure-policydefinition/test/policy-definition.spec.d.ts +9 -0
- package/lib/azure-policydefinition/test/policy-definition.spec.js +596 -0
- package/lib/azure-privatednszone/index.d.ts +1 -0
- package/lib/azure-privatednszone/index.js +18 -0
- package/lib/azure-privatednszone/lib/index.d.ts +2 -0
- package/lib/azure-privatednszone/lib/index.js +19 -0
- package/lib/azure-privatednszone/lib/private-dns-zone-schemas.d.ts +24 -0
- package/lib/azure-privatednszone/lib/private-dns-zone-schemas.js +254 -0
- package/lib/azure-privatednszone/lib/private-dns-zone.d.ts +178 -0
- package/lib/azure-privatednszone/lib/private-dns-zone.js +272 -0
- package/lib/azure-privatednszone/test/private-dns-zone.integ.d.ts +9 -0
- package/lib/azure-privatednszone/test/private-dns-zone.integ.js +84 -0
- package/lib/azure-privatednszone/test/private-dns-zone.spec.d.ts +9 -0
- package/lib/azure-privatednszone/test/private-dns-zone.spec.js +341 -0
- package/lib/azure-privatednszonelink/index.d.ts +1 -0
- package/lib/azure-privatednszonelink/index.js +18 -0
- package/lib/azure-privatednszonelink/lib/index.d.ts +2 -0
- package/lib/azure-privatednszonelink/lib/index.js +19 -0
- package/lib/azure-privatednszonelink/lib/private-dns-zone-link-schemas.d.ts +24 -0
- package/lib/azure-privatednszonelink/lib/private-dns-zone-link-schemas.js +262 -0
- package/lib/azure-privatednszonelink/lib/private-dns-zone-link.d.ts +202 -0
- package/lib/azure-privatednszonelink/lib/private-dns-zone-link.js +250 -0
- package/lib/azure-privatednszonelink/test/private-dns-zone-link.integ.d.ts +9 -0
- package/lib/azure-privatednszonelink/test/private-dns-zone-link.integ.js +110 -0
- package/lib/azure-privatednszonelink/test/private-dns-zone-link.spec.d.ts +9 -0
- package/lib/azure-privatednszonelink/test/private-dns-zone-link.spec.js +465 -0
- package/lib/azure-publicipaddress/index.d.ts +1 -0
- package/lib/azure-publicipaddress/index.js +18 -0
- package/lib/azure-publicipaddress/lib/index.d.ts +2 -0
- package/lib/azure-publicipaddress/lib/index.js +19 -0
- package/lib/azure-publicipaddress/lib/public-ip-address-schemas.d.ts +32 -0
- package/lib/azure-publicipaddress/lib/public-ip-address-schemas.js +227 -0
- package/lib/azure-publicipaddress/lib/public-ip-address.d.ts +247 -0
- package/lib/azure-publicipaddress/lib/public-ip-address.js +245 -0
- package/lib/azure-publicipaddress/test/public-ip-address.integ.d.ts +9 -0
- package/lib/azure-publicipaddress/test/public-ip-address.integ.js +75 -0
- package/lib/azure-publicipaddress/test/public-ip-address.spec.d.ts +15 -0
- package/lib/azure-publicipaddress/test/public-ip-address.spec.js +498 -0
- package/lib/azure-resourcegroup/index.d.ts +0 -37
- package/lib/azure-resourcegroup/index.js +1 -39
- package/lib/azure-resourcegroup/lib/index.d.ts +1 -44
- package/lib/azure-resourcegroup/lib/index.js +2 -43
- package/lib/azure-resourcegroup/lib/resource-group.d.ts +9 -23
- package/lib/azure-resourcegroup/lib/resource-group.js +23 -56
- package/lib/azure-resourcegroup/test/resource-group.integ.js +23 -11
- package/lib/azure-resourcegroup/test/resource-group.spec.js +13 -19
- package/lib/azure-roleassignment/index.d.ts +1 -0
- package/lib/azure-roleassignment/index.js +18 -0
- package/lib/azure-roleassignment/lib/index.d.ts +2 -0
- package/lib/azure-roleassignment/lib/index.js +19 -0
- package/lib/azure-roleassignment/lib/role-assignment-schemas.d.ts +25 -0
- package/lib/azure-roleassignment/lib/role-assignment-schemas.js +238 -0
- package/lib/azure-roleassignment/lib/role-assignment.d.ts +294 -0
- package/lib/azure-roleassignment/lib/role-assignment.js +257 -0
- package/lib/azure-roleassignment/test/role-assignment.integ.d.ts +12 -0
- package/lib/azure-roleassignment/test/role-assignment.integ.js +101 -0
- package/lib/azure-roleassignment/test/role-assignment.spec.d.ts +9 -0
- package/lib/azure-roleassignment/test/role-assignment.spec.js +633 -0
- package/lib/azure-roledefinition/index.d.ts +1 -0
- package/lib/azure-roledefinition/index.js +18 -0
- package/lib/azure-roledefinition/lib/index.d.ts +2 -0
- package/lib/azure-roledefinition/lib/index.js +19 -0
- package/lib/azure-roledefinition/lib/role-definition-schemas.d.ts +25 -0
- package/lib/azure-roledefinition/lib/role-definition-schemas.js +195 -0
- package/lib/azure-roledefinition/lib/role-definition.d.ts +236 -0
- package/lib/azure-roledefinition/lib/role-definition.js +192 -0
- package/lib/azure-roledefinition/test/role-definition.integ.d.ts +12 -0
- package/lib/azure-roledefinition/test/role-definition.integ.js +142 -0
- package/lib/azure-roledefinition/test/role-definition.spec.d.ts +9 -0
- package/lib/azure-roledefinition/test/role-definition.spec.js +946 -0
- package/lib/azure-storageaccount/index.d.ts +0 -19
- package/lib/azure-storageaccount/index.js +1 -20
- package/lib/azure-storageaccount/lib/index.d.ts +1 -7
- package/lib/azure-storageaccount/lib/index.js +2 -8
- package/lib/azure-storageaccount/lib/storage-account-schemas.d.ts +98 -0
- package/lib/azure-storageaccount/lib/storage-account-schemas.js +1 -1
- package/lib/azure-storageaccount/lib/storage-account.d.ts +40 -8
- package/lib/azure-storageaccount/lib/storage-account.js +145 -23
- package/lib/azure-storageaccount/test/storage-account.integ.js +91 -12
- package/lib/azure-subnet/index.d.ts +1 -0
- package/lib/azure-subnet/index.js +18 -0
- package/lib/azure-subnet/lib/index.d.ts +2 -0
- package/lib/azure-subnet/lib/index.js +19 -0
- package/lib/azure-subnet/lib/subnet-schemas.d.ts +32 -0
- package/lib/azure-subnet/lib/subnet-schemas.js +237 -0
- package/lib/azure-subnet/lib/subnet.d.ts +274 -0
- package/lib/azure-subnet/lib/subnet.js +235 -0
- package/lib/azure-subnet/test/subnet.integ.d.ts +11 -0
- package/lib/azure-subnet/test/subnet.integ.js +92 -0
- package/lib/azure-subnet/test/subnet.spec.d.ts +8 -0
- package/lib/azure-subnet/test/subnet.spec.js +395 -0
- package/lib/azure-virtualmachine/index.d.ts +1 -0
- package/lib/azure-virtualmachine/index.js +18 -0
- package/lib/azure-virtualmachine/lib/index.d.ts +2 -0
- package/lib/azure-virtualmachine/lib/index.js +19 -0
- package/lib/azure-virtualmachine/lib/virtual-machine-schemas.d.ts +327 -0
- package/lib/azure-virtualmachine/lib/virtual-machine-schemas.js +544 -0
- package/lib/azure-virtualmachine/lib/virtual-machine.d.ts +368 -0
- package/lib/azure-virtualmachine/lib/virtual-machine.js +441 -0
- package/lib/azure-virtualmachine/test/virtual-machine.integ.d.ts +9 -0
- package/lib/azure-virtualmachine/test/virtual-machine.integ.js +220 -0
- package/lib/azure-virtualmachine/test/virtual-machine.spec.d.ts +9 -0
- package/lib/azure-virtualmachine/test/virtual-machine.spec.js +1032 -0
- package/lib/azure-virtualnetwork/index.d.ts +1 -0
- package/lib/azure-virtualnetwork/index.js +18 -0
- package/lib/azure-virtualnetwork/lib/index.d.ts +2 -0
- package/lib/azure-virtualnetwork/lib/index.js +19 -0
- package/lib/azure-virtualnetwork/lib/virtual-network-schemas.d.ts +32 -0
- package/lib/azure-virtualnetwork/lib/virtual-network-schemas.js +236 -0
- package/lib/azure-virtualnetwork/lib/virtual-network.d.ts +204 -0
- package/lib/azure-virtualnetwork/lib/virtual-network.js +224 -0
- package/lib/azure-virtualnetwork/test/virtual-network.integ.d.ts +9 -0
- package/lib/azure-virtualnetwork/test/virtual-network.integ.js +91 -0
- package/lib/azure-virtualnetwork/test/virtual-network.spec.d.ts +8 -0
- package/lib/azure-virtualnetwork/test/virtual-network.spec.js +398 -0
- package/lib/azure-virtualnetworkmanager/index.d.ts +1 -0
- package/lib/azure-virtualnetworkmanager/index.js +18 -0
- package/lib/azure-virtualnetworkmanager/lib/connectivity-configuration-schemas.d.ts +48 -0
- package/lib/azure-virtualnetworkmanager/lib/connectivity-configuration-schemas.js +265 -0
- package/lib/azure-virtualnetworkmanager/lib/connectivity-configuration.d.ts +185 -0
- package/lib/azure-virtualnetworkmanager/lib/connectivity-configuration.js +206 -0
- package/lib/azure-virtualnetworkmanager/lib/index.d.ts +14 -0
- package/lib/azure-virtualnetworkmanager/lib/index.js +31 -0
- package/lib/azure-virtualnetworkmanager/lib/network-group-schemas.d.ts +32 -0
- package/lib/azure-virtualnetworkmanager/lib/network-group-schemas.js +189 -0
- package/lib/azure-virtualnetworkmanager/lib/network-group-static-member-schemas.d.ts +32 -0
- package/lib/azure-virtualnetworkmanager/lib/network-group-static-member-schemas.js +201 -0
- package/lib/azure-virtualnetworkmanager/lib/network-group-static-member.d.ts +135 -0
- package/lib/azure-virtualnetworkmanager/lib/network-group-static-member.js +163 -0
- package/lib/azure-virtualnetworkmanager/lib/network-group.d.ts +139 -0
- package/lib/azure-virtualnetworkmanager/lib/network-group.js +158 -0
- package/lib/azure-virtualnetworkmanager/lib/security-admin-configuration-schemas.d.ts +32 -0
- package/lib/azure-virtualnetworkmanager/lib/security-admin-configuration-schemas.js +182 -0
- package/lib/azure-virtualnetworkmanager/lib/security-admin-configuration.d.ts +144 -0
- package/lib/azure-virtualnetworkmanager/lib/security-admin-configuration.js +164 -0
- package/lib/azure-virtualnetworkmanager/lib/security-admin-rule-collection-schemas.d.ts +38 -0
- package/lib/azure-virtualnetworkmanager/lib/security-admin-rule-collection-schemas.js +206 -0
- package/lib/azure-virtualnetworkmanager/lib/security-admin-rule-collection.d.ts +142 -0
- package/lib/azure-virtualnetworkmanager/lib/security-admin-rule-collection.js +162 -0
- package/lib/azure-virtualnetworkmanager/lib/security-admin-rule-schemas.d.ts +39 -0
- package/lib/azure-virtualnetworkmanager/lib/security-admin-rule-schemas.js +359 -0
- package/lib/azure-virtualnetworkmanager/lib/security-admin-rule.d.ts +221 -0
- package/lib/azure-virtualnetworkmanager/lib/security-admin-rule.js +204 -0
- package/lib/azure-virtualnetworkmanager/lib/virtual-network-manager-schemas.d.ts +32 -0
- package/lib/azure-virtualnetworkmanager/lib/virtual-network-manager-schemas.js +236 -0
- package/lib/azure-virtualnetworkmanager/lib/virtual-network-manager.d.ts +337 -0
- package/lib/azure-virtualnetworkmanager/lib/virtual-network-manager.js +283 -0
- package/lib/azure-virtualnetworkmanager/test/virtual-network-manager.integ.d.ts +25 -0
- package/lib/azure-virtualnetworkmanager/test/virtual-network-manager.integ.js +402 -0
- package/lib/azure-virtualnetworkmanager/test/virtual-network-manager.spec.d.ts +9 -0
- package/lib/azure-virtualnetworkmanager/test/virtual-network-manager.spec.js +1652 -0
- package/lib/azure-vmss/index.d.ts +1 -0
- package/lib/azure-vmss/index.js +18 -0
- package/lib/azure-vmss/lib/index.d.ts +2 -0
- package/lib/azure-vmss/lib/index.js +19 -0
- package/lib/azure-vmss/lib/virtual-machine-scale-set.d.ts +250 -0
- package/lib/azure-vmss/lib/virtual-machine-scale-set.js +479 -0
- package/lib/azure-vmss/lib/vmss-schemas.d.ts +472 -0
- package/lib/azure-vmss/lib/vmss-schemas.js +444 -0
- package/lib/azure-vmss/test/virtual-machine-scale-set.integ.d.ts +15 -0
- package/lib/azure-vmss/test/virtual-machine-scale-set.integ.js +261 -0
- package/lib/azure-vmss/test/virtual-machine-scale-set.spec.d.ts +8 -0
- package/lib/azure-vmss/test/virtual-machine-scale-set.spec.js +997 -0
- package/lib/core-azure/lib/azapi/azapi-resource-tags.spec.d.ts +10 -0
- package/lib/core-azure/lib/azapi/azapi-resource-tags.spec.js +218 -0
- package/lib/core-azure/lib/azapi/azapi-resource.d.ts +268 -48
- package/lib/core-azure/lib/azapi/azapi-resource.js +411 -136
- package/lib/core-azure/lib/azapi/azapi-resource.spec.js +2 -2
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-client-config/index.d.ts +33 -21
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-client-config/index.js +69 -27
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource/index.d.ts +134 -120
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource/index.js +209 -59
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-action/index.d.ts +141 -128
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-action/index.js +183 -36
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-id/index.d.ts +55 -43
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-id/index.js +94 -26
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-list/index.d.ts +129 -116
- package/lib/core-azure/lib/azapi/providers-azapi/data-azapi-resource-list/index.js +155 -32
- package/lib/core-azure/lib/azapi/providers-azapi/data-plane-resource/index.d.ts +187 -174
- package/lib/core-azure/lib/azapi/providers-azapi/data-plane-resource/index.js +267 -48
- package/lib/core-azure/lib/azapi/providers-azapi/index.d.ts +10 -10
- package/lib/core-azure/lib/azapi/providers-azapi/index.js +1 -1
- package/lib/core-azure/lib/azapi/providers-azapi/lazy-index.d.ts +0 -0
- package/lib/core-azure/lib/azapi/providers-azapi/lazy-index.js +13 -0
- package/lib/core-azure/lib/azapi/providers-azapi/provider/index.d.ts +174 -162
- package/lib/core-azure/lib/azapi/providers-azapi/provider/index.js +278 -16
- package/lib/core-azure/lib/azapi/providers-azapi/resource/index.d.ts +239 -225
- package/lib/core-azure/lib/azapi/providers-azapi/resource/index.js +360 -76
- package/lib/core-azure/lib/azapi/providers-azapi/resource-action/index.d.ts +163 -150
- package/lib/core-azure/lib/azapi/providers-azapi/resource-action/index.js +221 -46
- package/lib/core-azure/lib/azapi/providers-azapi/update-resource/index.d.ts +162 -149
- package/lib/core-azure/lib/azapi/providers-azapi/update-resource/index.js +249 -50
- package/lib/core-azure/lib/azapi/resource-schema-validator.d.ts +118 -0
- package/lib/core-azure/lib/azapi/resource-schema-validator.js +236 -0
- package/lib/core-azure/lib/azapi/resource-version-manager.d.ts +103 -0
- package/lib/core-azure/lib/azapi/resource-version-manager.js +168 -0
- package/lib/core-azure/lib/azapi/schema-mapper/schema-mapper.js +13 -6
- package/lib/core-azure/lib/index.d.ts +2 -2
- package/lib/core-azure/lib/index.js +5 -5
- package/lib/core-azure/lib/version-manager/api-version-manager.js +1 -1
- package/lib/core-azure/lib/version-manager/interfaces/version-interfaces.js +7 -7
- package/lib/index.d.ts +56 -0
- package/lib/index.js +59 -2
- package/lib/testing/index.d.ts +92 -2
- package/lib/testing/index.js +258 -18
- package/lib/testing/lib/cleanup.d.ts +230 -0
- package/lib/testing/lib/cleanup.js +338 -0
- package/lib/testing/lib/metadata.d.ts +151 -0
- package/lib/testing/lib/metadata.js +183 -0
- package/lib/testing/lib/naming.d.ts +96 -0
- package/lib/testing/lib/naming.js +336 -0
- package/node_modules/uuid/LICENSE.md +9 -0
- package/node_modules/uuid/README.md +510 -0
- package/node_modules/uuid/dist/cjs/index.d.ts +15 -0
- package/node_modules/uuid/dist/cjs/index.js +31 -0
- package/node_modules/uuid/dist/cjs/max.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/max.js +3 -0
- package/node_modules/uuid/dist/cjs/md5.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/md5.js +13 -0
- package/node_modules/uuid/dist/cjs/native.d.ts +6 -0
- package/node_modules/uuid/dist/cjs/native.js +4 -0
- package/node_modules/uuid/dist/cjs/nil.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/nil.js +3 -0
- package/node_modules/uuid/dist/cjs/package.json +1 -0
- package/node_modules/uuid/dist/cjs/parse.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/parse.js +11 -0
- package/node_modules/uuid/dist/cjs/regex.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/regex.js +3 -0
- package/node_modules/uuid/dist/cjs/rng.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/rng.js +13 -0
- package/node_modules/uuid/dist/cjs/sha1.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/sha1.js +13 -0
- package/node_modules/uuid/dist/cjs/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/cjs/stringify.js +39 -0
- package/node_modules/uuid/dist/cjs/types.d.ts +21 -0
- package/node_modules/uuid/dist/cjs/types.js +2 -0
- package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/uuid-bin.js +72 -0
- package/node_modules/uuid/dist/cjs/v1.d.ts +11 -0
- package/node_modules/uuid/dist/cjs/v1.js +87 -0
- package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/v1ToV6.js +13 -0
- package/node_modules/uuid/dist/cjs/v3.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v3.js +14 -0
- package/node_modules/uuid/dist/cjs/v35.d.ts +7 -0
- package/node_modules/uuid/dist/cjs/v35.js +41 -0
- package/node_modules/uuid/dist/cjs/v4.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/v4.js +29 -0
- package/node_modules/uuid/dist/cjs/v5.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v5.js +14 -0
- package/node_modules/uuid/dist/cjs/v6.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/v6.js +19 -0
- package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/v6ToV1.js +13 -0
- package/node_modules/uuid/dist/cjs/v7.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v7.js +69 -0
- package/node_modules/uuid/dist/cjs/validate.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/validate.js +7 -0
- package/node_modules/uuid/dist/cjs/version.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/version.js +10 -0
- package/node_modules/uuid/dist/cjs-browser/index.d.ts +15 -0
- package/node_modules/uuid/dist/cjs-browser/index.js +31 -0
- package/node_modules/uuid/dist/cjs-browser/max.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/max.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/md5.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/md5.js +137 -0
- package/node_modules/uuid/dist/cjs-browser/native.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/native.js +4 -0
- package/node_modules/uuid/dist/cjs-browser/nil.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/nil.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/package.json +1 -0
- package/node_modules/uuid/dist/cjs-browser/parse.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/parse.js +11 -0
- package/node_modules/uuid/dist/cjs-browser/regex.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/regex.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/rng.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/rng.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/sha1.js +72 -0
- package/node_modules/uuid/dist/cjs-browser/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/cjs-browser/stringify.js +39 -0
- package/node_modules/uuid/dist/cjs-browser/types.d.ts +21 -0
- package/node_modules/uuid/dist/cjs-browser/types.js +2 -0
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +72 -0
- package/node_modules/uuid/dist/cjs-browser/v1.d.ts +11 -0
- package/node_modules/uuid/dist/cjs-browser/v1.js +87 -0
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +13 -0
- package/node_modules/uuid/dist/cjs-browser/v3.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v3.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/v35.d.ts +7 -0
- package/node_modules/uuid/dist/cjs-browser/v35.js +41 -0
- package/node_modules/uuid/dist/cjs-browser/v4.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/v4.js +29 -0
- package/node_modules/uuid/dist/cjs-browser/v5.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v5.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/v6.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/v6.js +19 -0
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +13 -0
- package/node_modules/uuid/dist/cjs-browser/v7.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v7.js +69 -0
- package/node_modules/uuid/dist/cjs-browser/validate.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/validate.js +7 -0
- package/node_modules/uuid/dist/cjs-browser/version.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/version.js +10 -0
- package/node_modules/uuid/dist/esm/bin/uuid +2 -0
- package/node_modules/uuid/dist/esm/index.d.ts +15 -0
- package/node_modules/uuid/dist/esm/index.js +14 -0
- package/node_modules/uuid/dist/esm/max.d.ts +2 -0
- package/node_modules/uuid/dist/esm/max.js +1 -0
- package/node_modules/uuid/dist/esm/md5.d.ts +4 -0
- package/node_modules/uuid/dist/esm/md5.js +11 -0
- package/node_modules/uuid/dist/esm/native.d.ts +6 -0
- package/node_modules/uuid/dist/esm/native.js +2 -0
- package/node_modules/uuid/dist/esm/nil.d.ts +2 -0
- package/node_modules/uuid/dist/esm/nil.js +1 -0
- package/node_modules/uuid/dist/esm/parse.d.ts +2 -0
- package/node_modules/uuid/dist/esm/parse.js +9 -0
- package/node_modules/uuid/dist/esm/regex.d.ts +2 -0
- package/node_modules/uuid/dist/esm/regex.js +1 -0
- package/node_modules/uuid/dist/esm/rng.d.ts +1 -0
- package/node_modules/uuid/dist/esm/rng.js +10 -0
- package/node_modules/uuid/dist/esm/sha1.d.ts +4 -0
- package/node_modules/uuid/dist/esm/sha1.js +11 -0
- package/node_modules/uuid/dist/esm/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/esm/stringify.js +35 -0
- package/node_modules/uuid/dist/esm/types.d.ts +21 -0
- package/node_modules/uuid/dist/esm/types.js +1 -0
- package/node_modules/uuid/dist/esm/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/esm/uuid-bin.js +70 -0
- package/node_modules/uuid/dist/esm/v1.d.ts +11 -0
- package/node_modules/uuid/dist/esm/v1.js +83 -0
- package/node_modules/uuid/dist/esm/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/esm/v1ToV6.js +10 -0
- package/node_modules/uuid/dist/esm/v3.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v3.js +9 -0
- package/node_modules/uuid/dist/esm/v35.d.ts +7 -0
- package/node_modules/uuid/dist/esm/v35.js +36 -0
- package/node_modules/uuid/dist/esm/v4.d.ts +4 -0
- package/node_modules/uuid/dist/esm/v4.js +27 -0
- package/node_modules/uuid/dist/esm/v5.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v5.js +9 -0
- package/node_modules/uuid/dist/esm/v6.d.ts +4 -0
- package/node_modules/uuid/dist/esm/v6.js +17 -0
- package/node_modules/uuid/dist/esm/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/esm/v6ToV1.js +10 -0
- package/node_modules/uuid/dist/esm/v7.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v7.js +65 -0
- package/node_modules/uuid/dist/esm/validate.d.ts +2 -0
- package/node_modules/uuid/dist/esm/validate.js +5 -0
- package/node_modules/uuid/dist/esm/version.d.ts +2 -0
- package/node_modules/uuid/dist/esm/version.js +8 -0
- package/node_modules/uuid/dist/esm-browser/index.d.ts +15 -0
- package/node_modules/uuid/dist/esm-browser/index.js +14 -0
- package/node_modules/uuid/dist/esm-browser/max.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/max.js +1 -0
- package/node_modules/uuid/dist/esm-browser/md5.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +135 -0
- package/node_modules/uuid/dist/esm-browser/native.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/native.js +2 -0
- package/node_modules/uuid/dist/esm-browser/nil.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/node_modules/uuid/dist/esm-browser/parse.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/parse.js +9 -0
- package/node_modules/uuid/dist/esm-browser/regex.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/node_modules/uuid/dist/esm-browser/rng.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/rng.js +11 -0
- package/node_modules/uuid/dist/esm-browser/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/sha1.js +70 -0
- package/node_modules/uuid/dist/esm-browser/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/esm-browser/stringify.js +35 -0
- package/node_modules/uuid/dist/esm-browser/types.d.ts +21 -0
- package/node_modules/uuid/dist/esm-browser/types.js +1 -0
- package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/uuid-bin.js +70 -0
- package/node_modules/uuid/dist/esm-browser/v1.d.ts +11 -0
- package/node_modules/uuid/dist/esm-browser/v1.js +83 -0
- package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/v1ToV6.js +10 -0
- package/node_modules/uuid/dist/esm-browser/v3.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v3.js +9 -0
- package/node_modules/uuid/dist/esm-browser/v35.d.ts +7 -0
- package/node_modules/uuid/dist/esm-browser/v35.js +36 -0
- package/node_modules/uuid/dist/esm-browser/v4.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/v4.js +27 -0
- package/node_modules/uuid/dist/esm-browser/v5.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v5.js +9 -0
- package/node_modules/uuid/dist/esm-browser/v6.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/v6.js +17 -0
- package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/v6ToV1.js +10 -0
- package/node_modules/uuid/dist/esm-browser/v7.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v7.js +65 -0
- package/node_modules/uuid/dist/esm-browser/validate.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/validate.js +5 -0
- package/node_modules/uuid/dist/esm-browser/version.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/version.js +8 -0
- package/node_modules/uuid/package.json +132 -0
- package/package.json +17 -12
- package/scripts/cleanup-test-resources.ts +387 -0
- package/scripts/generate-index.js +25 -8
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* API schemas for Azure Metric Alert across all supported versions
|
|
4
|
+
*
|
|
5
|
+
* This file defines the complete API schemas for Microsoft.Insights/metricAlerts
|
|
6
|
+
* across all supported API versions. The schemas are used by the AzapiResource
|
|
7
|
+
* framework for validation, transformation, and version management.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.METRIC_ALERT_TYPE = exports.ALL_METRIC_ALERT_VERSIONS = exports.METRIC_ALERT_VERSION_2018_03_01 = exports.METRIC_ALERT_SCHEMA_2018_03_01 = void 0;
|
|
11
|
+
const version_interfaces_1 = require("../../core-azure/lib/version-manager/interfaces/version-interfaces");
|
|
12
|
+
// =============================================================================
|
|
13
|
+
// COMMON PROPERTY DEFINITIONS
|
|
14
|
+
// =============================================================================
|
|
15
|
+
/**
|
|
16
|
+
* Common property definitions shared across all Metric Alert versions
|
|
17
|
+
*/
|
|
18
|
+
const COMMON_METRIC_ALERT_PROPERTIES = {
|
|
19
|
+
location: {
|
|
20
|
+
dataType: version_interfaces_1.PropertyType.STRING,
|
|
21
|
+
required: true,
|
|
22
|
+
description: "Azure region (global for metric alerts)",
|
|
23
|
+
defaultValue: "global",
|
|
24
|
+
validation: [
|
|
25
|
+
{
|
|
26
|
+
ruleType: version_interfaces_1.ValidationRuleType.REQUIRED,
|
|
27
|
+
message: "Location is required for Metric Alerts",
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
name: {
|
|
32
|
+
dataType: version_interfaces_1.PropertyType.STRING,
|
|
33
|
+
required: true,
|
|
34
|
+
description: "Name of the metric alert",
|
|
35
|
+
validation: [
|
|
36
|
+
{
|
|
37
|
+
ruleType: version_interfaces_1.ValidationRuleType.REQUIRED,
|
|
38
|
+
message: "Name is required",
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
description: {
|
|
43
|
+
dataType: version_interfaces_1.PropertyType.STRING,
|
|
44
|
+
required: false,
|
|
45
|
+
description: "Description of the alert rule",
|
|
46
|
+
},
|
|
47
|
+
severity: {
|
|
48
|
+
dataType: version_interfaces_1.PropertyType.NUMBER,
|
|
49
|
+
required: true,
|
|
50
|
+
description: "Alert severity (0=Critical, 1=Error, 2=Warning, 3=Informational, 4=Verbose)",
|
|
51
|
+
validation: [
|
|
52
|
+
{
|
|
53
|
+
ruleType: version_interfaces_1.ValidationRuleType.REQUIRED,
|
|
54
|
+
message: "Severity is required",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
ruleType: version_interfaces_1.ValidationRuleType.VALUE_RANGE,
|
|
58
|
+
value: { min: 0, max: 4 },
|
|
59
|
+
message: "Severity must be between 0 and 4",
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
enabled: {
|
|
64
|
+
dataType: version_interfaces_1.PropertyType.BOOLEAN,
|
|
65
|
+
required: true,
|
|
66
|
+
defaultValue: true,
|
|
67
|
+
description: "Enable the alert rule",
|
|
68
|
+
},
|
|
69
|
+
scopes: {
|
|
70
|
+
dataType: version_interfaces_1.PropertyType.ARRAY,
|
|
71
|
+
required: true,
|
|
72
|
+
description: "Resource IDs that this alert is scoped to",
|
|
73
|
+
validation: [
|
|
74
|
+
{
|
|
75
|
+
ruleType: version_interfaces_1.ValidationRuleType.REQUIRED,
|
|
76
|
+
message: "At least one scope is required",
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
evaluationFrequency: {
|
|
81
|
+
dataType: version_interfaces_1.PropertyType.STRING,
|
|
82
|
+
required: true,
|
|
83
|
+
description: "How often the alert is evaluated (ISO 8601 duration)",
|
|
84
|
+
defaultValue: "PT5M",
|
|
85
|
+
},
|
|
86
|
+
windowSize: {
|
|
87
|
+
dataType: version_interfaces_1.PropertyType.STRING,
|
|
88
|
+
required: true,
|
|
89
|
+
description: "Time window for aggregation (ISO 8601 duration)",
|
|
90
|
+
defaultValue: "PT15M",
|
|
91
|
+
},
|
|
92
|
+
targetResourceType: {
|
|
93
|
+
dataType: version_interfaces_1.PropertyType.STRING,
|
|
94
|
+
required: false,
|
|
95
|
+
description: "Resource type of the target (for multi-resource alerts)",
|
|
96
|
+
},
|
|
97
|
+
targetResourceRegion: {
|
|
98
|
+
dataType: version_interfaces_1.PropertyType.STRING,
|
|
99
|
+
required: false,
|
|
100
|
+
description: "Region of the target resource (for multi-resource alerts)",
|
|
101
|
+
},
|
|
102
|
+
criteria: {
|
|
103
|
+
dataType: version_interfaces_1.PropertyType.OBJECT,
|
|
104
|
+
required: true,
|
|
105
|
+
description: "Alert criteria (static or dynamic threshold)",
|
|
106
|
+
validation: [
|
|
107
|
+
{
|
|
108
|
+
ruleType: version_interfaces_1.ValidationRuleType.REQUIRED,
|
|
109
|
+
message: "Criteria is required",
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
actions: {
|
|
114
|
+
dataType: version_interfaces_1.PropertyType.ARRAY,
|
|
115
|
+
required: false,
|
|
116
|
+
description: "Action groups to notify",
|
|
117
|
+
},
|
|
118
|
+
autoMitigate: {
|
|
119
|
+
dataType: version_interfaces_1.PropertyType.BOOLEAN,
|
|
120
|
+
required: false,
|
|
121
|
+
defaultValue: true,
|
|
122
|
+
description: "Auto-resolve alerts when condition is no longer met",
|
|
123
|
+
},
|
|
124
|
+
tags: {
|
|
125
|
+
dataType: version_interfaces_1.PropertyType.OBJECT,
|
|
126
|
+
required: false,
|
|
127
|
+
defaultValue: {},
|
|
128
|
+
description: "Resource tags",
|
|
129
|
+
validation: [
|
|
130
|
+
{
|
|
131
|
+
ruleType: version_interfaces_1.ValidationRuleType.TYPE_CHECK,
|
|
132
|
+
value: version_interfaces_1.PropertyType.OBJECT,
|
|
133
|
+
message: "Tags must be an object with string key-value pairs",
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
// =============================================================================
|
|
139
|
+
// VERSION-SPECIFIC SCHEMAS
|
|
140
|
+
// =============================================================================
|
|
141
|
+
/**
|
|
142
|
+
* API Schema for Metric Alert version 2018-03-01
|
|
143
|
+
*/
|
|
144
|
+
exports.METRIC_ALERT_SCHEMA_2018_03_01 = {
|
|
145
|
+
resourceType: "Microsoft.Insights/metricAlerts",
|
|
146
|
+
version: "2018-03-01",
|
|
147
|
+
properties: {
|
|
148
|
+
...COMMON_METRIC_ALERT_PROPERTIES,
|
|
149
|
+
},
|
|
150
|
+
required: [
|
|
151
|
+
"location",
|
|
152
|
+
"name",
|
|
153
|
+
"severity",
|
|
154
|
+
"enabled",
|
|
155
|
+
"scopes",
|
|
156
|
+
"evaluationFrequency",
|
|
157
|
+
"windowSize",
|
|
158
|
+
"criteria",
|
|
159
|
+
],
|
|
160
|
+
optional: [
|
|
161
|
+
"description",
|
|
162
|
+
"targetResourceType",
|
|
163
|
+
"targetResourceRegion",
|
|
164
|
+
"actions",
|
|
165
|
+
"autoMitigate",
|
|
166
|
+
"tags",
|
|
167
|
+
],
|
|
168
|
+
deprecated: [],
|
|
169
|
+
transformationRules: {},
|
|
170
|
+
validationRules: [
|
|
171
|
+
{
|
|
172
|
+
property: "location",
|
|
173
|
+
rules: [
|
|
174
|
+
{
|
|
175
|
+
ruleType: version_interfaces_1.ValidationRuleType.REQUIRED,
|
|
176
|
+
message: "Location is required for Metric Alerts",
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
property: "name",
|
|
182
|
+
rules: [
|
|
183
|
+
{
|
|
184
|
+
ruleType: version_interfaces_1.ValidationRuleType.REQUIRED,
|
|
185
|
+
message: "Name is required for Metric Alerts",
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
property: "scopes",
|
|
191
|
+
rules: [
|
|
192
|
+
{
|
|
193
|
+
ruleType: version_interfaces_1.ValidationRuleType.REQUIRED,
|
|
194
|
+
message: "At least one scope is required",
|
|
195
|
+
},
|
|
196
|
+
],
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
property: "criteria",
|
|
200
|
+
rules: [
|
|
201
|
+
{
|
|
202
|
+
ruleType: version_interfaces_1.ValidationRuleType.REQUIRED,
|
|
203
|
+
message: "Criteria is required",
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
},
|
|
207
|
+
],
|
|
208
|
+
};
|
|
209
|
+
// =============================================================================
|
|
210
|
+
// VERSION CONFIGURATIONS
|
|
211
|
+
// =============================================================================
|
|
212
|
+
/**
|
|
213
|
+
* Version configuration for Metric Alert 2018-03-01
|
|
214
|
+
*/
|
|
215
|
+
exports.METRIC_ALERT_VERSION_2018_03_01 = {
|
|
216
|
+
version: "2018-03-01",
|
|
217
|
+
schema: exports.METRIC_ALERT_SCHEMA_2018_03_01,
|
|
218
|
+
supportLevel: version_interfaces_1.VersionSupportLevel.ACTIVE,
|
|
219
|
+
releaseDate: "2018-03-01",
|
|
220
|
+
deprecationDate: undefined,
|
|
221
|
+
sunsetDate: undefined,
|
|
222
|
+
breakingChanges: [],
|
|
223
|
+
migrationGuide: "/docs/metric-alert/migration-2018-03-01",
|
|
224
|
+
changeLog: [
|
|
225
|
+
{
|
|
226
|
+
changeType: "updated",
|
|
227
|
+
description: "Stable API version for Metric Alerts with dynamic threshold support",
|
|
228
|
+
breaking: false,
|
|
229
|
+
},
|
|
230
|
+
],
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
* All supported Metric Alert versions for registration
|
|
234
|
+
*/
|
|
235
|
+
exports.ALL_METRIC_ALERT_VERSIONS = [
|
|
236
|
+
exports.METRIC_ALERT_VERSION_2018_03_01,
|
|
237
|
+
];
|
|
238
|
+
/**
|
|
239
|
+
* Resource type constant
|
|
240
|
+
*/
|
|
241
|
+
exports.METRIC_ALERT_TYPE = "Microsoft.Insights/metricAlerts";
|
|
242
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0cmljLWFsZXJ0LXNjaGVtYXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8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Sxcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBWRVJTSU9OLVNQRUNJRklDIFNDSEVNQVNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbi8qKlxuICogQVBJIFNjaGVtYSBmb3IgTWV0cmljIEFsZXJ0IHZlcnNpb24gMjAxOC0wMy0wMVxuICovXG5leHBvcnQgY29uc3QgTUVUUklDX0FMRVJUX1NDSEVNQV8yMDE4XzAzXzAxOiBBcGlTY2hlbWEgPSB7XG4gIHJlc291cmNlVHlwZTogXCJNaWNyb3NvZnQuSW5zaWdodHMvbWV0cmljQWxlcnRzXCIsXG4gIHZlcnNpb246IFwiMjAxOC0wMy0wMVwiLFxuICBwcm9wZXJ0aWVzOiB7XG4gICAgLi4uQ09NTU9OX01FVFJJQ19BTEVSVF9QUk9QRVJUSUVTLFxuICB9LFxuICByZXF1aXJlZDogW1xuICAgIFwibG9jYXRpb25cIixcbiAgICBcIm5hbWVcIixcbiAgICBcInNldmVyaXR5XCIsXG4gICAgXCJlbmFibGVkXCIsXG4gICAgXCJzY29wZXNcIixcbiAgICBcImV2YWx1YXRpb25GcmVxdWVuY3lcIixcbiAgICBcIndpbmRvd1NpemVcIixcbiAgICBcImNyaXRlcmlhXCIsXG4gIF0sXG4gIG9wdGlvbmFsOiBbXG4gICAgXCJkZXNjcmlwdGlvblwiLFxuICAgIFwidGFyZ2V0UmVzb3VyY2VUeXBlXCIsXG4gICAgXCJ0YXJnZXRSZXNvdXJjZVJlZ2lvblwiLFxuICAgIFwiYWN0aW9uc1wiLFxuICAgIFwiYXV0b01pdGlnYXRlXCIsXG4gICAgXCJ0YWdzXCIsXG4gIF0sXG4gIGRlcHJlY2F0ZWQ6IFtdLFxuICB0cmFuc2Zvcm1hdGlvblJ1bG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cbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBWRVJTSU9OIENPTkZJR1VSQVRJT05TXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG4vKipcbiAqIFZlcnNpb24gY29uZmlndXJhdGlvbiBmb3IgTWV0cmljIEFsZXJ0IDIwMTgtMDMtMDFcbiAqL1xuZXhwb3J0IGNvbnN0IE1FVFJJQ19BTEVSVF9WRVJTSU9OXzIwMThfMDNfMDE6IFZlcnNpb25Db25maWcgPSB7XG4gIHZlcnNpb246IFwiMjAxOC0wMy0wMVwiLFxuICBzY2hlbWE6IE1FVFJJQ19BTEVSVF9TQ0hFTUFfMjAxOF8wM18wMSxcbiAgc3VwcG9ydExldmVsOiBWZXJzaW9uU3VwcG9ydExldmVsLkFDVElWRSxcbiAgcmVsZWFzZURhdGU6IFwiMjAxOC0wMy0wMVwiLFxuICBkZXByZWNhdGlvbkRhdGU6IHVuZGVmaW5lZCxcbiAgc3Vuc2V0RGF0ZTogdW5kZWZpbmVkLFxuICBicmVha2luZ0NoYW5nZXM6IFtdLFxuICBtaWdyYXRpb25HdWlkZTogXCIvZG9jcy9tZXRyaWMtYWxlcnQvbWlncmF0aW9uLTIwMTgtMDMtMDFcIixcbiAgY2hhbmdlTG9nOiBbXG4gICAge1xuICAgICAgY2hhbmdlVHlwZTogXCJ1cGRhdGVkXCIsXG4gICAgICBkZXNjcmlwdGlvbjpcbiAgICAgICAgXCJTdGFibGUgQVBJIHZlcnNpb24gZm9yIE1ldHJpYyBBbGVydHMgd2l0aCBkeW5hbWljIHRocmVzaG9sZCBzdXBwb3J0XCIsXG4gICAgICBicmVha2luZzogZmFsc2UsXG4gICAgfSxcbiAgXSxcbn07XG5cbi8qKlxuICogQWxsIHN1cHBvcnRlZCBNZXRyaWMgQWxlcnQgdmVyc2lvbnMgZm9yIHJlZ2lzdHJhdGlvblxuICovXG5leHBvcnQgY29uc3QgQUxMX01FVFJJQ19BTEVSVF9WRVJTSU9OUzogVmVyc2lvbkNvbmZpZ1tdID0gW1xuICBNRVRSSUNfQUxFUlRfVkVSU0lPTl8yMDE4XzAzXzAxLFxuXTtcblxuLyoqXG4gKiBSZXNvdXJjZSB0eXBlIGNvbnN0YW50XG4gKi9cbmV4cG9ydCBjb25zdCBNRVRSSUNfQUxFUlRfVFlQRSA9IFwiTWljcm9zb2Z0Lkluc2lnaHRzL21ldHJpY0FsZXJ0c1wiO1xuIl19
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified Azure Metric Alert implementation using AzapiResource framework
|
|
3
|
+
*
|
|
4
|
+
* This class provides a version-aware implementation for Azure Metric Alerts
|
|
5
|
+
* that automatically handles version management, schema validation, and property
|
|
6
|
+
* transformation across all supported API versions.
|
|
7
|
+
*
|
|
8
|
+
* Supported API Versions:
|
|
9
|
+
* - 2018-03-01 (Active, Latest)
|
|
10
|
+
*
|
|
11
|
+
* Features:
|
|
12
|
+
* - Automatic latest version resolution when no version is specified
|
|
13
|
+
* - Explicit version pinning for stability requirements
|
|
14
|
+
* - Schema-driven validation and transformation
|
|
15
|
+
* - Full JSII compliance for multi-language support
|
|
16
|
+
* - Support for both static and dynamic threshold criteria
|
|
17
|
+
*/
|
|
18
|
+
import * as cdktf from "cdktf";
|
|
19
|
+
import { Construct } from "constructs";
|
|
20
|
+
import { AzapiResource, AzapiResourceProps } from "../../core-azure/lib/azapi/azapi-resource";
|
|
21
|
+
import { ApiSchema } from "../../core-azure/lib/version-manager/interfaces/version-interfaces";
|
|
22
|
+
/**
|
|
23
|
+
* Metric dimension for filtering
|
|
24
|
+
*/
|
|
25
|
+
export interface MetricDimension {
|
|
26
|
+
/**
|
|
27
|
+
* The dimension name
|
|
28
|
+
*/
|
|
29
|
+
readonly name: string;
|
|
30
|
+
/**
|
|
31
|
+
* The operator (Include or Exclude)
|
|
32
|
+
*/
|
|
33
|
+
readonly operator: "Include" | "Exclude";
|
|
34
|
+
/**
|
|
35
|
+
* The dimension values
|
|
36
|
+
*/
|
|
37
|
+
readonly values: string[];
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Static threshold criteria configuration
|
|
41
|
+
*/
|
|
42
|
+
export interface StaticThresholdCriteria {
|
|
43
|
+
/**
|
|
44
|
+
* The criteria type
|
|
45
|
+
*/
|
|
46
|
+
readonly type: "StaticThreshold";
|
|
47
|
+
/**
|
|
48
|
+
* The metric name
|
|
49
|
+
*/
|
|
50
|
+
readonly metricName: string;
|
|
51
|
+
/**
|
|
52
|
+
* The metric namespace (optional)
|
|
53
|
+
*/
|
|
54
|
+
readonly metricNamespace?: string;
|
|
55
|
+
/**
|
|
56
|
+
* The comparison operator
|
|
57
|
+
*/
|
|
58
|
+
readonly operator: "GreaterThan" | "LessThan" | "GreaterOrEqual" | "LessOrEqual" | "Equals";
|
|
59
|
+
/**
|
|
60
|
+
* The threshold value
|
|
61
|
+
*/
|
|
62
|
+
readonly threshold: number;
|
|
63
|
+
/**
|
|
64
|
+
* The time aggregation method
|
|
65
|
+
*/
|
|
66
|
+
readonly timeAggregation: "Average" | "Count" | "Minimum" | "Maximum" | "Total";
|
|
67
|
+
/**
|
|
68
|
+
* Metric dimensions for filtering (optional)
|
|
69
|
+
*/
|
|
70
|
+
readonly dimensions?: MetricDimension[];
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Metric alert failing periods configuration
|
|
74
|
+
*/
|
|
75
|
+
export interface MetricAlertFailingPeriods {
|
|
76
|
+
/**
|
|
77
|
+
* Number of evaluation periods
|
|
78
|
+
*/
|
|
79
|
+
readonly numberOfEvaluationPeriods: number;
|
|
80
|
+
/**
|
|
81
|
+
* Minimum failing periods to trigger alert
|
|
82
|
+
*/
|
|
83
|
+
readonly minFailingPeriodsToAlert: number;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Dynamic threshold criteria configuration
|
|
87
|
+
*/
|
|
88
|
+
export interface DynamicThresholdCriteria {
|
|
89
|
+
/**
|
|
90
|
+
* The criteria type
|
|
91
|
+
*/
|
|
92
|
+
readonly type: "DynamicThreshold";
|
|
93
|
+
/**
|
|
94
|
+
* The metric name
|
|
95
|
+
*/
|
|
96
|
+
readonly metricName: string;
|
|
97
|
+
/**
|
|
98
|
+
* The metric namespace (optional)
|
|
99
|
+
*/
|
|
100
|
+
readonly metricNamespace?: string;
|
|
101
|
+
/**
|
|
102
|
+
* The comparison operator
|
|
103
|
+
*/
|
|
104
|
+
readonly operator: "GreaterThan" | "LessThan" | "GreaterOrLessThan";
|
|
105
|
+
/**
|
|
106
|
+
* The alert sensitivity (Low, Medium, High)
|
|
107
|
+
*/
|
|
108
|
+
readonly alertSensitivity: "Low" | "Medium" | "High";
|
|
109
|
+
/**
|
|
110
|
+
* Failing periods configuration
|
|
111
|
+
*/
|
|
112
|
+
readonly failingPeriods: MetricAlertFailingPeriods;
|
|
113
|
+
/**
|
|
114
|
+
* The time aggregation method
|
|
115
|
+
*/
|
|
116
|
+
readonly timeAggregation: "Average" | "Count" | "Minimum" | "Maximum" | "Total";
|
|
117
|
+
/**
|
|
118
|
+
* Metric dimensions for filtering (optional)
|
|
119
|
+
*/
|
|
120
|
+
readonly dimensions?: MetricDimension[];
|
|
121
|
+
/**
|
|
122
|
+
* Ignore data before this date (ISO 8601 format)
|
|
123
|
+
*/
|
|
124
|
+
readonly ignoreDataBefore?: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Metric alert action configuration
|
|
128
|
+
*/
|
|
129
|
+
export interface MetricAlertAction {
|
|
130
|
+
/**
|
|
131
|
+
* The action group resource ID
|
|
132
|
+
*/
|
|
133
|
+
readonly actionGroupId: string;
|
|
134
|
+
/**
|
|
135
|
+
* Webhook properties (optional)
|
|
136
|
+
*/
|
|
137
|
+
readonly webHookProperties?: {
|
|
138
|
+
[key: string]: string;
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Properties for the unified Azure Metric Alert
|
|
143
|
+
*
|
|
144
|
+
* Extends AzapiResourceProps with Metric Alert specific properties
|
|
145
|
+
*/
|
|
146
|
+
export interface MetricAlertProps extends AzapiResourceProps {
|
|
147
|
+
/**
|
|
148
|
+
* Description of the alert rule
|
|
149
|
+
*/
|
|
150
|
+
readonly description?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Alert severity (0=Critical, 1=Error, 2=Warning, 3=Informational, 4=Verbose)
|
|
153
|
+
* @example 2
|
|
154
|
+
*/
|
|
155
|
+
readonly severity: 0 | 1 | 2 | 3 | 4;
|
|
156
|
+
/**
|
|
157
|
+
* Whether the alert rule is enabled
|
|
158
|
+
* @defaultValue true
|
|
159
|
+
*/
|
|
160
|
+
readonly enabled?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Resource IDs that this alert is scoped to
|
|
163
|
+
* @example ["/subscriptions/.../resourceGroups/.../providers/Microsoft.Compute/virtualMachines/myVM"]
|
|
164
|
+
*/
|
|
165
|
+
readonly scopes: string[];
|
|
166
|
+
/**
|
|
167
|
+
* How often the alert is evaluated (ISO 8601 duration)
|
|
168
|
+
* @defaultValue "PT5M"
|
|
169
|
+
* @example "PT1M", "PT5M", "PT15M"
|
|
170
|
+
*/
|
|
171
|
+
readonly evaluationFrequency?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Time window for aggregation (ISO 8601 duration)
|
|
174
|
+
* @defaultValue "PT15M"
|
|
175
|
+
* @example "PT5M", "PT15M", "PT30M", "PT1H"
|
|
176
|
+
*/
|
|
177
|
+
readonly windowSize?: string;
|
|
178
|
+
/**
|
|
179
|
+
* Resource type of the target (for multi-resource alerts)
|
|
180
|
+
* @example "Microsoft.Compute/virtualMachines"
|
|
181
|
+
*/
|
|
182
|
+
readonly targetResourceType?: string;
|
|
183
|
+
/**
|
|
184
|
+
* Region of the target resource (for multi-resource alerts)
|
|
185
|
+
* @example "eastus"
|
|
186
|
+
*/
|
|
187
|
+
readonly targetResourceRegion?: string;
|
|
188
|
+
/**
|
|
189
|
+
* Alert criteria (static or dynamic threshold)
|
|
190
|
+
*/
|
|
191
|
+
readonly criteria: StaticThresholdCriteria | DynamicThresholdCriteria;
|
|
192
|
+
/**
|
|
193
|
+
* Action groups to notify
|
|
194
|
+
*/
|
|
195
|
+
readonly actions?: MetricAlertAction[];
|
|
196
|
+
/**
|
|
197
|
+
* Auto-resolve alerts when condition is no longer met
|
|
198
|
+
* @defaultValue true
|
|
199
|
+
*/
|
|
200
|
+
readonly autoMitigate?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Resource group ID where the metric alert will be created
|
|
203
|
+
*/
|
|
204
|
+
readonly resourceGroupId?: string;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Metric Alert properties for the request body
|
|
208
|
+
*/
|
|
209
|
+
export interface MetricAlertBodyProperties {
|
|
210
|
+
readonly description?: string;
|
|
211
|
+
readonly severity: number;
|
|
212
|
+
readonly enabled: boolean;
|
|
213
|
+
readonly scopes: string[];
|
|
214
|
+
readonly evaluationFrequency: string;
|
|
215
|
+
readonly windowSize: string;
|
|
216
|
+
readonly targetResourceType?: string;
|
|
217
|
+
readonly targetResourceRegion?: string;
|
|
218
|
+
readonly criteria: any;
|
|
219
|
+
readonly actions?: MetricAlertAction[];
|
|
220
|
+
readonly autoMitigate: boolean;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* The resource body interface for Azure Metric Alert API calls
|
|
224
|
+
*/
|
|
225
|
+
export interface MetricAlertBody {
|
|
226
|
+
readonly location: string;
|
|
227
|
+
readonly tags?: {
|
|
228
|
+
[key: string]: string;
|
|
229
|
+
};
|
|
230
|
+
readonly properties: MetricAlertBodyProperties;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Unified Azure Metric Alert implementation
|
|
234
|
+
*
|
|
235
|
+
* This class provides a single, version-aware implementation that automatically handles version
|
|
236
|
+
* resolution, schema validation, and property transformation while maintaining full JSII compliance.
|
|
237
|
+
*
|
|
238
|
+
* Metric Alerts monitor Azure resource metrics and trigger notifications when thresholds are breached.
|
|
239
|
+
* They support both static thresholds and dynamic thresholds based on machine learning.
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* // Static threshold alert for VM CPU:
|
|
243
|
+
* const cpuAlert = new MetricAlert(this, "high-cpu", {
|
|
244
|
+
* name: "vm-high-cpu-alert",
|
|
245
|
+
* resourceGroupId: resourceGroup.id,
|
|
246
|
+
* severity: 2,
|
|
247
|
+
* scopes: [virtualMachine.id],
|
|
248
|
+
* criteria: {
|
|
249
|
+
* type: "StaticThreshold",
|
|
250
|
+
* metricName: "Percentage CPU",
|
|
251
|
+
* operator: "GreaterThan",
|
|
252
|
+
* threshold: 80,
|
|
253
|
+
* timeAggregation: "Average"
|
|
254
|
+
* },
|
|
255
|
+
* actions: [{
|
|
256
|
+
* actionGroupId: actionGroup.id
|
|
257
|
+
* }]
|
|
258
|
+
* });
|
|
259
|
+
*
|
|
260
|
+
* @example
|
|
261
|
+
* // Dynamic threshold alert with machine learning:
|
|
262
|
+
* const dynamicAlert = new MetricAlert(this, "dynamic-cpu", {
|
|
263
|
+
* name: "vm-dynamic-cpu-alert",
|
|
264
|
+
* resourceGroupId: resourceGroup.id,
|
|
265
|
+
* severity: 2,
|
|
266
|
+
* scopes: [resourceGroup.id],
|
|
267
|
+
* targetResourceType: "Microsoft.Compute/virtualMachines",
|
|
268
|
+
* targetResourceRegion: "eastus",
|
|
269
|
+
* criteria: {
|
|
270
|
+
* type: "DynamicThreshold",
|
|
271
|
+
* metricName: "Percentage CPU",
|
|
272
|
+
* operator: "GreaterThan",
|
|
273
|
+
* alertSensitivity: "Medium",
|
|
274
|
+
* failingPeriods: {
|
|
275
|
+
* numberOfEvaluationPeriods: 4,
|
|
276
|
+
* minFailingPeriodsToAlert: 3
|
|
277
|
+
* },
|
|
278
|
+
* timeAggregation: "Average"
|
|
279
|
+
* },
|
|
280
|
+
* actions: [{
|
|
281
|
+
* actionGroupId: actionGroup.id
|
|
282
|
+
* }]
|
|
283
|
+
* });
|
|
284
|
+
*
|
|
285
|
+
* @stability stable
|
|
286
|
+
*/
|
|
287
|
+
export declare class MetricAlert extends AzapiResource {
|
|
288
|
+
/**
|
|
289
|
+
* The input properties for this Metric Alert instance
|
|
290
|
+
*/
|
|
291
|
+
readonly props: MetricAlertProps;
|
|
292
|
+
readonly idOutput: cdktf.TerraformOutput;
|
|
293
|
+
readonly nameOutput: cdktf.TerraformOutput;
|
|
294
|
+
/**
|
|
295
|
+
* Creates a new Azure Metric Alert using the AzapiResource framework
|
|
296
|
+
*
|
|
297
|
+
* The constructor automatically handles version resolution, schema registration,
|
|
298
|
+
* validation, and resource creation.
|
|
299
|
+
*
|
|
300
|
+
* @param scope - The scope in which to define this construct
|
|
301
|
+
* @param id - The unique identifier for this instance
|
|
302
|
+
* @param props - Configuration properties for the Metric Alert
|
|
303
|
+
*/
|
|
304
|
+
constructor(scope: Construct, id: string, props: MetricAlertProps);
|
|
305
|
+
/**
|
|
306
|
+
* Gets the default API version to use when no explicit version is specified
|
|
307
|
+
* Returns the most recent stable version as the default
|
|
308
|
+
*/
|
|
309
|
+
protected defaultVersion(): string;
|
|
310
|
+
/**
|
|
311
|
+
* Gets the Azure resource type for Metric Alerts
|
|
312
|
+
*/
|
|
313
|
+
protected resourceType(): string;
|
|
314
|
+
/**
|
|
315
|
+
* Gets the API schema for the resolved version
|
|
316
|
+
* Uses the framework's schema resolution to get the appropriate schema
|
|
317
|
+
*/
|
|
318
|
+
protected apiSchema(): ApiSchema;
|
|
319
|
+
/**
|
|
320
|
+
* Creates the resource body for the Azure API call
|
|
321
|
+
* Transforms the input properties into the JSON format expected by Azure REST API
|
|
322
|
+
*/
|
|
323
|
+
protected createResourceBody(props: any): any;
|
|
324
|
+
/**
|
|
325
|
+
* Add a tag to the Metric Alert
|
|
326
|
+
* Note: This modifies the construct props but requires a new deployment to take effect
|
|
327
|
+
*/
|
|
328
|
+
addTag(key: string, value: string): void;
|
|
329
|
+
/**
|
|
330
|
+
* Remove a tag from the Metric Alert
|
|
331
|
+
* Note: This modifies the construct props but requires a new deployment to take effect
|
|
332
|
+
*/
|
|
333
|
+
removeTag(key: string): void;
|
|
334
|
+
}
|