Chilkat Online Tools

ListAnomaliesForInsight 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

// The following code creates the JSON request body.
// The JSON created by this code is shown below.

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

Dim json As New Chilkat.JsonObject
success = json.UpdateString("AccountId","string")
success = json.UpdateInt("MaxResults",123)
success = json.UpdateString("NextToken","string")
success = json.UpdateInt("StartTimeRange.FromTime",123)
success = json.UpdateInt("StartTimeRange.ToTime",123)

// The JSON request body created by the above code:

// {
//   "AccountId": "string",
//   "MaxResults": number,
//   "NextToken": "string",
//   "StartTimeRange": {
//     "FromTime": number,
//     "ToTime": number
//   }
// }

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

Dim sbRequestBody As New Chilkat.StringBuilder
success = json.EmitSb(sbRequestBody)
Dim sbResponseBody As New Chilkat.StringBuilder
success = rest.FullRequestSb("POST","/anomalies/insight/{InsightId}",sbRequestBody,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 CloseTime As Int32
Dim OpenTime As Int32
Dim EndTime As Int32
Dim StartTime As Int32
Dim AssociatedInsightId As String
Dim Id As String
Dim Limit As Int32
Dim PredictionTimeRangeEndTime As Int32
Dim PredictionTimeRangeStartTime As Int32
Dim Severity As String
Dim Source As String
Dim SourceResourceName As String
Dim SourceResourceType As String
Dim Status As String
Dim UpdateTime As Int32
Dim j As Int32
Dim count_j As Int32
Dim Name As String
Dim v_Type As String
Dim strVal As String
Dim AppBoundaryKey As String
Dim k As Int32
Dim count_k 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 json1 As Chilkat.JsonObject
Dim i1 As Int32
Dim count_i1 As Int32
Dim Value_int As Int32
Dim AnomalyReportedTimeRangeCloseTime As Int32
Dim AnomalyReportedTimeRangeOpenTime As Int32
Dim AnomalyTimeRangeEndTime As Int32
Dim AnomalyTimeRangeStartTime As Int32
Dim CausalAnomalyId As String
Dim Description As String
Dim MetricDataSummaryStatusCode As String

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

            json1 = jResp.ObjectOf("ProactiveAnomalies[i].SourceDetails.PerformanceInsightsMetrics[j].ReferenceData[k]")
            i1 = 0
            count_i1 = json1.SizeOfArray("ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions")
            While i1 < count_i1
                json1.I = i1
                strVal = json1.StringOf("ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions[i]")
                i1 = i1 + 1
            Wend

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

            json1 = jResp.ObjectOf("ReactiveAnomalies[i].SourceDetails.PerformanceInsightsMetrics[j].ReferenceData[k]")
            i1 = 0
            count_i1 = json1.SizeOfArray("ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions")
            While i1 < count_i1
                json1.I = i1
                strVal = json1.StringOf("ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions[i]")
                i1 = i1 + 1
            Wend

            k = k + 1
        Wend
        k = 0
        count_k = jResp.SizeOfArray("ReactiveAnomalies[i].SourceDetails.PerformanceInsightsMetrics[j].StatsAtAnomaly")
        While k < count_k
            jResp.K = k
            v_Type = jResp.StringOf("ReactiveAnomalies[i].SourceDetails.PerformanceInsightsMetrics[j].StatsAtAnomaly[k].Type")
            Value_int = jResp.IntOf("ReactiveAnomalies[i].SourceDetails.PerformanceInsightsMetrics[j].StatsAtAnomaly[k].Value")
            k = k + 1
        Wend
        k = 0
        count_k = jResp.SizeOfArray("ReactiveAnomalies[i].SourceDetails.PerformanceInsightsMetrics[j].StatsAtBaseline")
        While k < count_k
            jResp.K = k
            v_Type = jResp.StringOf("ReactiveAnomalies[i].SourceDetails.PerformanceInsightsMetrics[j].StatsAtBaseline[k].Type")
            Value_int = jResp.IntOf("ReactiveAnomalies[i].SourceDetails.PerformanceInsightsMetrics[j].StatsAtBaseline[k].Value")
            k = k + 1
        Wend
        j = j + 1
    Wend
    i = i + 1
Wend

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

// {
//   "NextToken": "string",
//   "ProactiveAnomalies": [
//     {
//       "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
//     }
//   ],
//   "ReactiveAnomalies": [
//     {
//       "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"
//     }
//   ]
// }