Skip to content

Commit

Permalink
Implement misc methods (#15546)
Browse files Browse the repository at this point in the history
get_ingestion_progress 
list_anomaly_alerting_configurations 
list_anomaly_detection_configurations_for_metric 
reset_ingestion_status
list_metric_enrichment_status 
add_feedback
get_feedback
list_feedbacks
  • Loading branch information
christothes authored Sep 30, 2020
1 parent 442e922 commit 2b59433
Show file tree
Hide file tree
Showing 106 changed files with 4,228 additions and 2,477 deletions.

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/ClientCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Text.RegularExpressions;
using Azure.AI.MetricsAdvisor.Models;

namespace Azure.AI.MetricsAdvisor
{
Expand Down Expand Up @@ -108,5 +109,21 @@ public static string GetHookId(string locationHeader)
throw new ArgumentException(UnexpectedHeaderFormat);
}
}

private static readonly Regex s_feedbackIdRegex = new Regex(@"/feedback/metric/(?<feedbackId>[\d\w-]*)$", RegexOptions.Compiled, TimeSpan.FromSeconds(2));

public static Guid GetFeedbackId(string locationHeader)
{
Match match = s_feedbackIdRegex.Match(locationHeader);

if (match.Success)
{
return new Guid(match.Groups["feedbackId"].Value);
}
else
{
throw new ArgumentException(UnexpectedHeaderFormat);
}
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2b59433

Please sign in to comment.