You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On attempting to create a metric alert using IAzure.AlertRules.MetricAlerts you cannot create the alert as disabled on creation due to the fact that Microsoft.Azure.Management.Monitor.Fluent.MetricAlert.Definition.WithRuleDisabled() returns an IWithActionGroup not an IWithCreate interface.
Example - Create() doesn't exist on IWithActionGroup interface returned from WithRuleDisabled()
For .NET, the development focus has shifted to the next generation of Azure SDKs which follows the new SDK guideline and introduces a set of important new features. Those new packages are currently in preview state and we are actively working on making it production ready. You can visit this link here to see the latest .NET packages: https://devblogs.microsoft.com/azure-sdk/october-2020-management-ga/
With this background, .NET Fluent is currently in a low maintenance mode, and we mostly do security and bug fixes. It is subject to deprecation in the future when the new set of .NET packages become Generally Available (GA). Please let us know if there are further questions, thanks!
v1.38.0
On attempting to create a metric alert using IAzure.AlertRules.MetricAlerts you cannot create the alert as disabled on creation due to the fact that Microsoft.Azure.Management.Monitor.Fluent.MetricAlert.Definition.WithRuleDisabled() returns an IWithActionGroup not an IWithCreate interface.
Example - Create() doesn't exist on IWithActionGroup interface returned from WithRuleDisabled()
azure.AlertRules.MetricAlerts.Define( "HIGH CPU" )
.WithExistingResourceGroup( resourceGroup )
.WithTargetResource( virtualMachine )
.WithPeriod( TimeSpan.FromMinutes( 15 ) )
.WithFrequency( TimeSpan.FromMinutes( 1 ) )
.WithAlertDetails( 1, "" )
.WithActionGroups( actionGroup.Id )
.DefineAlertCriteria( "High CPU" )
.WithMetricName( "Percentage CPU" )
.WithCondition( MetricAlertRuleTimeAggregation.Average, MetricAlertRuleCondition.GreaterThan, 85 )
.Attach()
.WithRuleDisabled()
.Create();
The text was updated successfully, but these errors were encountered: