Chilkat Online Tools

DescribeAnomaly Xojo Example

Amazon DevOps Guru

// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

Dim rest As New Chilkat.Rest
Dim success As Boolean

Dim authAws As New Chilkat.AuthAws
authAws.AccessKey = "AWS_ACCESS_KEY"
authAws.SecretKey = "AWS_SECRET_KEY"

// Don't forget to change the region to your particular region. (Also make the same change in the call to Connect below.)
authAws.Region = "us-west-2"
authAws.ServiceName = "devops-guru"
// SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
success = rest.SetAuthAws(authAws)

// URL: https://devops-guru.us-west-2.amazonaws.com/
// Use the same region as specified above.
success = rest.Connect("devops-guru.us-west-2.amazonaws.com",443,True,True)
If (success <> True) Then
    System.DebugLog("ConnectFailReason: " + Str(rest.ConnectFailReason))
    System.DebugLog(rest.LastErrorText)
    Return
End If

success = rest.AddHeader("Content-Type","application/x-amz-json-1.1")
success = rest.AddHeader("X-Amz-Target","DescribeAnomaly")

Dim sbResponseBody As New Chilkat.StringBuilder
success = rest.FullRequestNoBodySb("GET","/anomalies/{Id}",sbResponseBody)
If (success <> True) Then
    System.DebugLog(rest.LastErrorText)
    Return
End If

Dim respStatusCode As Int32
respStatusCode = rest.ResponseStatusCode
System.DebugLog("response status code = " + Str(respStatusCode))
If (respStatusCode <> 200) Then
    System.DebugLog("Response Header:")
    System.DebugLog(rest.ResponseHeader)
    System.DebugLog("Response Body:")
    System.DebugLog(sbResponseBody.GetAsString())
    Return
End If

Dim jResp As New Chilkat.JsonObject
success = jResp.LoadSb(sbResponseBody)

// The following code parses the JSON response.
// A sample JSON response is shown below the sample code.

// Use this online tool to generate parsing code from sample JSON:
// Generate Parsing Code from JSON

Dim strVal As String
Dim AppBoundaryKey As String
Dim j As Int32
Dim count_j As Int32
Dim StatusCode As String
Dim MetricName As String
Dim Namespace As String
Dim Period As Int32
Dim Stat As String
Dim Unit As String
Dim Value As String
Dim MetricValue As Int32
Dim Timestamp As Int32
Dim MetricDisplayName As String
Dim v_String As String
Dim Group As String
Dim GroupByLimit As Int32
Dim Metric As String
Dim FilterString As String
Dim GroupByGroup As String
Dim MetricQueryMetric As String
Dim ReferenceScalarValue As Int32
Dim k As Int32
Dim count_k As Int32
Dim Value_int As Int32
Dim MetricDataSummaryStatusCode As String

Dim CloseTime As Int32
CloseTime = jResp.IntOf("ProactiveAnomaly.AnomalyReportedTimeRange.CloseTime")
Dim OpenTime As Int32
OpenTime = jResp.IntOf("ProactiveAnomaly.AnomalyReportedTimeRange.OpenTime")
Dim EndTime As Int32
EndTime = jResp.IntOf("ProactiveAnomaly.AnomalyTimeRange.EndTime")
Dim StartTime As Int32
StartTime = jResp.IntOf("ProactiveAnomaly.AnomalyTimeRange.StartTime")
Dim AssociatedInsightId As String
AssociatedInsightId = jResp.StringOf("ProactiveAnomaly.AssociatedInsightId")
Dim Id As String
Id = jResp.StringOf("ProactiveAnomaly.Id")
Dim Limit As Int32
Limit = jResp.IntOf("ProactiveAnomaly.Limit")
Dim PredictionTimeRangeEndTime As Int32
PredictionTimeRangeEndTime = jResp.IntOf("ProactiveAnomaly.PredictionTimeRange.EndTime")
Dim PredictionTimeRangeStartTime As Int32
PredictionTimeRangeStartTime = jResp.IntOf("ProactiveAnomaly.PredictionTimeRange.StartTime")
Dim Severity As String
Severity = jResp.StringOf("ProactiveAnomaly.Severity")
Dim Source As String
Source = jResp.StringOf("ProactiveAnomaly.SourceMetadata.Source")
Dim SourceResourceName As String
SourceResourceName = jResp.StringOf("ProactiveAnomaly.SourceMetadata.SourceResourceName")
Dim SourceResourceType As String
SourceResourceType = jResp.StringOf("ProactiveAnomaly.SourceMetadata.SourceResourceType")
Dim Status As String
Status = jResp.StringOf("ProactiveAnomaly.Status")
Dim UpdateTime As Int32
UpdateTime = jResp.IntOf("ProactiveAnomaly.UpdateTime")
Dim AnomalyReportedTimeRangeCloseTime As Int32
AnomalyReportedTimeRangeCloseTime = jResp.IntOf("ReactiveAnomaly.AnomalyReportedTimeRange.CloseTime")
Dim AnomalyReportedTimeRangeOpenTime As Int32
AnomalyReportedTimeRangeOpenTime = jResp.IntOf("ReactiveAnomaly.AnomalyReportedTimeRange.OpenTime")
Dim AnomalyTimeRangeEndTime As Int32
AnomalyTimeRangeEndTime = jResp.IntOf("ReactiveAnomaly.AnomalyTimeRange.EndTime")
Dim AnomalyTimeRangeStartTime As Int32
AnomalyTimeRangeStartTime = jResp.IntOf("ReactiveAnomaly.AnomalyTimeRange.StartTime")
Dim ReactiveAnomalyAssociatedInsightId As String
ReactiveAnomalyAssociatedInsightId = jResp.StringOf("ReactiveAnomaly.AssociatedInsightId")
Dim CausalAnomalyId As String
CausalAnomalyId = jResp.StringOf("ReactiveAnomaly.CausalAnomalyId")
Dim Description As String
Description = jResp.StringOf("ReactiveAnomaly.Description")
Dim ReactiveAnomalyId As String
ReactiveAnomalyId = jResp.StringOf("ReactiveAnomaly.Id")
Dim Name As String
Name = jResp.StringOf("ReactiveAnomaly.Name")
Dim ReactiveAnomalySeverity As String
ReactiveAnomalySeverity = jResp.StringOf("ReactiveAnomaly.Severity")
Dim ReactiveAnomalyStatus As String
ReactiveAnomalyStatus = jResp.StringOf("ReactiveAnomaly.Status")
Dim v_Type As String
v_Type = jResp.StringOf("ReactiveAnomaly.Type")
Dim i As Int32
i = 0
Dim count_i As Int32
count_i = jResp.SizeOfArray("ProactiveAnomaly.AnomalyResources")
While i < count_i
    jResp.I = i
    Name = jResp.StringOf("ProactiveAnomaly.AnomalyResources[i].Name")
    v_Type = jResp.StringOf("ProactiveAnomaly.AnomalyResources[i].Type")
    i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("ProactiveAnomaly.ResourceCollection.CloudFormation.StackNames")
While i < count_i
    jResp.I = i
    strVal = jResp.StringOf("ProactiveAnomaly.ResourceCollection.CloudFormation.StackNames[i]")
    i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("ProactiveAnomaly.ResourceCollection.Tags")
While i < count_i
    jResp.I = i
    AppBoundaryKey = jResp.StringOf("ProactiveAnomaly.ResourceCollection.Tags[i].AppBoundaryKey")
    j = 0
    count_j = jResp.SizeOfArray("ProactiveAnomaly.ResourceCollection.Tags[i].TagValues")
    While j < count_j
        jResp.J = j
        strVal = jResp.StringOf("ProactiveAnomaly.ResourceCollection.Tags[i].TagValues[j]")
        j = j + 1
    Wend
    i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("ProactiveAnomaly.SourceDetails.CloudWatchMetrics")
While i < count_i
    jResp.I = i
    StatusCode = jResp.StringOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.StatusCode")
    MetricName = jResp.StringOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricName")
    Namespace = jResp.StringOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Namespace")
    Period = jResp.IntOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Period")
    Stat = jResp.StringOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Stat")
    Unit = jResp.StringOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Unit")
    j = 0
    count_j = jResp.SizeOfArray("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions")
    While j < count_j
        jResp.J = j
        Name = jResp.StringOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Name")
        Value = jResp.StringOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Value")
        j = j + 1
    Wend
    j = 0
    count_j = jResp.SizeOfArray("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList")
    While j < count_j
        jResp.J = j
        MetricValue = jResp.IntOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].MetricValue")
        Timestamp = jResp.IntOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].Timestamp")
        j = j + 1
    Wend
    i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics")
While i < count_i
    jResp.I = i
    MetricDisplayName = jResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricDisplayName")
    v_String = jResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Filter.string")
    Group = jResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Group")
    GroupByLimit = jResp.IntOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Limit")
    Metric = jResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Metric")
    Unit = jResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].Unit")
    j = 0
    count_j = jResp.SizeOfArray("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions")
    While j < count_j
        jResp.J = j
        strVal = jResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions[j]")
        j = j + 1
    Wend
    j = 0
    count_j = jResp.SizeOfArray("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData")
    While j < count_j
        jResp.J = j
        FilterString = jResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Filter.string")
        GroupByGroup = jResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Group")
        GroupByLimit = jResp.IntOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Limit")
        MetricQueryMetric = jResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Metric")
        ReferenceScalarValue = jResp.IntOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceScalar.Value")
        Name = jResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].Name")
        k = 0
        count_k = jResp.SizeOfArray("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions")
        While k < count_k
            jResp.K = k
            strVal = jResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions[k]")
            k = k + 1
        Wend
        j = j + 1
    Wend
    j = 0
    count_j = jResp.SizeOfArray("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly")
    While j < count_j
        jResp.J = j
        v_Type = jResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Type")
        Value_int = jResp.IntOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Value")
        j = j + 1
    Wend
    j = 0
    count_j = jResp.SizeOfArray("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline")
    While j < count_j
        jResp.J = j
        v_Type = jResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Type")
        Value_int = jResp.IntOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Value")
        j = j + 1
    Wend
    i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("ReactiveAnomaly.AnomalyResources")
While i < count_i
    jResp.I = i
    Name = jResp.StringOf("ReactiveAnomaly.AnomalyResources[i].Name")
    v_Type = jResp.StringOf("ReactiveAnomaly.AnomalyResources[i].Type")
    i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("ReactiveAnomaly.ResourceCollection.CloudFormation.StackNames")
While i < count_i
    jResp.I = i
    strVal = jResp.StringOf("ReactiveAnomaly.ResourceCollection.CloudFormation.StackNames[i]")
    i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("ReactiveAnomaly.ResourceCollection.Tags")
While i < count_i
    jResp.I = i
    AppBoundaryKey = jResp.StringOf("ReactiveAnomaly.ResourceCollection.Tags[i].AppBoundaryKey")
    j = 0
    count_j = jResp.SizeOfArray("ReactiveAnomaly.ResourceCollection.Tags[i].TagValues")
    While j < count_j
        jResp.J = j
        strVal = jResp.StringOf("ReactiveAnomaly.ResourceCollection.Tags[i].TagValues[j]")
        j = j + 1
    Wend
    i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("ReactiveAnomaly.SourceDetails.CloudWatchMetrics")
While i < count_i
    jResp.I = i
    MetricDataSummaryStatusCode = jResp.StringOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.StatusCode")
    MetricName = jResp.StringOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricName")
    Namespace = jResp.StringOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Namespace")
    Period = jResp.IntOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Period")
    Stat = jResp.StringOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Stat")
    Unit = jResp.StringOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Unit")
    j = 0
    count_j = jResp.SizeOfArray("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions")
    While j < count_j
        jResp.J = j
        Name = jResp.StringOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Name")
        Value = jResp.StringOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Value")
        j = j + 1
    Wend
    j = 0
    count_j = jResp.SizeOfArray("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList")
    While j < count_j
        jResp.J = j
        MetricValue = jResp.IntOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].MetricValue")
        Timestamp = jResp.IntOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].Timestamp")
        j = j + 1
    Wend
    i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics")
While i < count_i
    jResp.I = i
    MetricDisplayName = jResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricDisplayName")
    FilterString = jResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Filter.string")
    GroupByGroup = jResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Group")
    GroupByLimit = jResp.IntOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Limit")
    MetricQueryMetric = jResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Metric")
    Unit = jResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].Unit")
    j = 0
    count_j = jResp.SizeOfArray("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions")
    While j < count_j
        jResp.J = j
        strVal = jResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions[j]")
        j = j + 1
    Wend
    j = 0
    count_j = jResp.SizeOfArray("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData")
    While j < count_j
        jResp.J = j
        FilterString = jResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Filter.string")
        GroupByGroup = jResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Group")
        GroupByLimit = jResp.IntOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Limit")
        MetricQueryMetric = jResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Metric")
        ReferenceScalarValue = jResp.IntOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceScalar.Value")
        Name = jResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].Name")
        k = 0
        count_k = jResp.SizeOfArray("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions")
        While k < count_k
            jResp.K = k
            strVal = jResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions[k]")
            k = k + 1
        Wend
        j = j + 1
    Wend
    j = 0
    count_j = jResp.SizeOfArray("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly")
    While j < count_j
        jResp.J = j
        v_Type = jResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Type")
        Value_int = jResp.IntOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Value")
        j = j + 1
    Wend
    j = 0
    count_j = jResp.SizeOfArray("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline")
    While j < count_j
        jResp.J = j
        v_Type = jResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Type")
        Value_int = jResp.IntOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Value")
        j = j + 1
    Wend
    i = i + 1
Wend

// A sample JSON response body parsed by the above code:

// {
//   "ProactiveAnomaly": {
//     "AnomalyReportedTimeRange": {
//       "CloseTime": number,
//       "OpenTime": number
//     },
//     "AnomalyResources": [
//       {
//         "Name": "string",
//         "Type": "string"
//       }
//     ],
//     "AnomalyTimeRange": {
//       "EndTime": number,
//       "StartTime": number
//     },
//     "AssociatedInsightId": "string",
//     "Id": "string",
//     "Limit": number,
//     "PredictionTimeRange": {
//       "EndTime": number,
//       "StartTime": number
//     },
//     "ResourceCollection": {
//       "CloudFormation": {
//         "StackNames": [
//           "string"
//         ]
//       },
//       "Tags": [
//         {
//           "AppBoundaryKey": "string",
//           "TagValues": [
//             "string"
//           ]
//         }
//       ]
//     },
//     "Severity": "string",
//     "SourceDetails": {
//       "CloudWatchMetrics": [
//         {
//           "Dimensions": [
//             {
//               "Name": "string",
//               "Value": "string"
//             }
//           ],
//           "MetricDataSummary": {
//             "StatusCode": "string",
//             "TimestampMetricValuePairList": [
//               {
//                 "MetricValue": number,
//                 "Timestamp": number
//               }
//             ]
//           },
//           "MetricName": "string",
//           "Namespace": "string",
//           "Period": number,
//           "Stat": "string",
//           "Unit": "string"
//         }
//       ],
//       "PerformanceInsightsMetrics": [
//         {
//           "MetricDisplayName": "string",
//           "MetricQuery": {
//             "Filter": {
//               "string": "string"
//             },
//             "GroupBy": {
//               "Dimensions": [
//                 "string"
//               ],
//               "Group": "string",
//               "Limit": number
//             },
//             "Metric": "string"
//           },
//           "ReferenceData": [
//             {
//               "ComparisonValues": {
//                 "ReferenceMetric": {
//                   "MetricQuery": {
//                     "Filter": {
//                       "string": "string"
//                     },
//                     "GroupBy": {
//                       "Dimensions": [
//                         "string"
//                       ],
//                       "Group": "string",
//                       "Limit": number
//                     },
//                     "Metric": "string"
//                   }
//                 },
//                 "ReferenceScalar": {
//                   "Value": number
//                 }
//               },
//               "Name": "string"
//             }
//           ],
//           "StatsAtAnomaly": [
//             {
//               "Type": "string",
//               "Value": number
//             }
//           ],
//           "StatsAtBaseline": [
//             {
//               "Type": "string",
//               "Value": number
//             }
//           ],
//           "Unit": "string"
//         }
//       ]
//     },
//     "SourceMetadata": {
//       "Source": "string",
//       "SourceResourceName": "string",
//       "SourceResourceType": "string"
//     },
//     "Status": "string",
//     "UpdateTime": number
//   },
//   "ReactiveAnomaly": {
//     "AnomalyReportedTimeRange": {
//       "CloseTime": number,
//       "OpenTime": number
//     },
//     "AnomalyResources": [
//       {
//         "Name": "string",
//         "Type": "string"
//       }
//     ],
//     "AnomalyTimeRange": {
//       "EndTime": number,
//       "StartTime": number
//     },
//     "AssociatedInsightId": "string",
//     "CausalAnomalyId": "string",
//     "Description": "string",
//     "Id": "string",
//     "Name": "string",
//     "ResourceCollection": {
//       "CloudFormation": {
//         "StackNames": [
//           "string"
//         ]
//       },
//       "Tags": [
//         {
//           "AppBoundaryKey": "string",
//           "TagValues": [
//             "string"
//           ]
//         }
//       ]
//     },
//     "Severity": "string",
//     "SourceDetails": {
//       "CloudWatchMetrics": [
//         {
//           "Dimensions": [
//             {
//               "Name": "string",
//               "Value": "string"
//             }
//           ],
//           "MetricDataSummary": {
//             "StatusCode": "string",
//             "TimestampMetricValuePairList": [
//               {
//                 "MetricValue": number,
//                 "Timestamp": number
//               }
//             ]
//           },
//           "MetricName": "string",
//           "Namespace": "string",
//           "Period": number,
//           "Stat": "string",
//           "Unit": "string"
//         }
//       ],
//       "PerformanceInsightsMetrics": [
//         {
//           "MetricDisplayName": "string",
//           "MetricQuery": {
//             "Filter": {
//               "string": "string"
//             },
//             "GroupBy": {
//               "Dimensions": [
//                 "string"
//               ],
//               "Group": "string",
//               "Limit": number
//             },
//             "Metric": "string"
//           },
//           "ReferenceData": [
//             {
//               "ComparisonValues": {
//                 "ReferenceMetric": {
//                   "MetricQuery": {
//                     "Filter": {
//                       "string": "string"
//                     },
//                     "GroupBy": {
//                       "Dimensions": [
//                         "string"
//                       ],
//                       "Group": "string",
//                       "Limit": number
//                     },
//                     "Metric": "string"
//                   }
//                 },
//                 "ReferenceScalar": {
//                   "Value": number
//                 }
//               },
//               "Name": "string"
//             }
//           ],
//           "StatsAtAnomaly": [
//             {
//               "Type": "string",
//               "Value": number
//             }
//           ],
//           "StatsAtBaseline": [
//             {
//               "Type": "string",
//               "Value": number
//             }
//           ],
//           "Unit": "string"
//         }
//       ]
//     },
//     "Status": "string",
//     "Type": "string"
//   }
// }