Chilkat Online Tools

DescribeAnomaly Swift3 Example

Amazon DevOps Guru

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

    let rest = CkoRest()!
    var success: Bool

    let authAws = CkoAuthAws()!
    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
    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", port: 443, tls: true, autoReconnect: true)
    if success != true {
        print("ConnectFailReason: \(rest.connectFailReason.intValue)")
        print("\(rest.lastErrorText!)")
        return
    }

    rest.addHeader("Content-Type", value: "application/x-amz-json-1.1")
    rest.addHeader("X-Amz-Target", value: "DescribeAnomaly")

    let sbResponseBody = CkoStringBuilder()!
    success = rest.fullRequestNoBodySb("GET", uriPath: "/anomalies/{Id}", sb: sbResponseBody)
    if success != true {
        print("\(rest.lastErrorText!)")
        return
    }

    var respStatusCode: Int = rest.responseStatusCode.intValue
    print("response status code = \(respStatusCode)")
    if respStatusCode != 200 {
        print("Response Header:")
        print("\(rest.responseHeader!)")
        print("Response Body:")
        print("\(sbResponseBody.getAsString()!)")
        return
    }

    let jResp = CkoJsonObject()!
    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

    var strVal: String?
    var AppBoundaryKey: String?
    var j: Int
    var count_j: Int
    var StatusCode: String?
    var MetricName: String?
    var Namespace: String?
    var Period: Int
    var Stat: String?
    var Unit: String?
    var Value: String?
    var MetricValue: Int
    var Timestamp: Int
    var MetricDisplayName: String?
    var v_String: String?
    var Group: String?
    var GroupByLimit: Int
    var Metric: String?
    var FilterString: String?
    var GroupByGroup: String?
    var MetricQueryMetric: String?
    var ReferenceScalarValue: Int
    var k: Int
    var count_k: Int
    var Value_int: Int
    var MetricDataSummaryStatusCode: String?

    var CloseTime: Int = jResp.int(of: "ProactiveAnomaly.AnomalyReportedTimeRange.CloseTime").intValue
    var OpenTime: Int = jResp.int(of: "ProactiveAnomaly.AnomalyReportedTimeRange.OpenTime").intValue
    var EndTime: Int = jResp.int(of: "ProactiveAnomaly.AnomalyTimeRange.EndTime").intValue
    var StartTime: Int = jResp.int(of: "ProactiveAnomaly.AnomalyTimeRange.StartTime").intValue
    var AssociatedInsightId: String? = jResp.string(of: "ProactiveAnomaly.AssociatedInsightId")
    var Id: String? = jResp.string(of: "ProactiveAnomaly.Id")
    var Limit: Int = jResp.int(of: "ProactiveAnomaly.Limit").intValue
    var PredictionTimeRangeEndTime: Int = jResp.int(of: "ProactiveAnomaly.PredictionTimeRange.EndTime").intValue
    var PredictionTimeRangeStartTime: Int = jResp.int(of: "ProactiveAnomaly.PredictionTimeRange.StartTime").intValue
    var Severity: String? = jResp.string(of: "ProactiveAnomaly.Severity")
    var Source: String? = jResp.string(of: "ProactiveAnomaly.SourceMetadata.Source")
    var SourceResourceName: String? = jResp.string(of: "ProactiveAnomaly.SourceMetadata.SourceResourceName")
    var SourceResourceType: String? = jResp.string(of: "ProactiveAnomaly.SourceMetadata.SourceResourceType")
    var Status: String? = jResp.string(of: "ProactiveAnomaly.Status")
    var UpdateTime: Int = jResp.int(of: "ProactiveAnomaly.UpdateTime").intValue
    var AnomalyReportedTimeRangeCloseTime: Int = jResp.int(of: "ReactiveAnomaly.AnomalyReportedTimeRange.CloseTime").intValue
    var AnomalyReportedTimeRangeOpenTime: Int = jResp.int(of: "ReactiveAnomaly.AnomalyReportedTimeRange.OpenTime").intValue
    var AnomalyTimeRangeEndTime: Int = jResp.int(of: "ReactiveAnomaly.AnomalyTimeRange.EndTime").intValue
    var AnomalyTimeRangeStartTime: Int = jResp.int(of: "ReactiveAnomaly.AnomalyTimeRange.StartTime").intValue
    var ReactiveAnomalyAssociatedInsightId: String? = jResp.string(of: "ReactiveAnomaly.AssociatedInsightId")
    var CausalAnomalyId: String? = jResp.string(of: "ReactiveAnomaly.CausalAnomalyId")
    var Description: String? = jResp.string(of: "ReactiveAnomaly.Description")
    var ReactiveAnomalyId: String? = jResp.string(of: "ReactiveAnomaly.Id")
    var Name: String? = jResp.string(of: "ReactiveAnomaly.Name")
    var ReactiveAnomalySeverity: String? = jResp.string(of: "ReactiveAnomaly.Severity")
    var ReactiveAnomalyStatus: String? = jResp.string(of: "ReactiveAnomaly.Status")
    var v_Type: String? = jResp.string(of: "ReactiveAnomaly.Type")
    var i: Int = 0
    var count_i: Int = jResp.size(ofArray: "ProactiveAnomaly.AnomalyResources").intValue
    while i < count_i {
        jResp.i = i
        Name = jResp.string(of: "ProactiveAnomaly.AnomalyResources[i].Name")
        v_Type = jResp.string(of: "ProactiveAnomaly.AnomalyResources[i].Type")
        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "ProactiveAnomaly.ResourceCollection.CloudFormation.StackNames").intValue
    while i < count_i {
        jResp.i = i
        strVal = jResp.string(of: "ProactiveAnomaly.ResourceCollection.CloudFormation.StackNames[i]")
        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "ProactiveAnomaly.ResourceCollection.Tags").intValue
    while i < count_i {
        jResp.i = i
        AppBoundaryKey = jResp.string(of: "ProactiveAnomaly.ResourceCollection.Tags[i].AppBoundaryKey")
        j = 0
        count_j = jResp.size(ofArray: "ProactiveAnomaly.ResourceCollection.Tags[i].TagValues").intValue
        while j < count_j {
            jResp.j = j
            strVal = jResp.string(of: "ProactiveAnomaly.ResourceCollection.Tags[i].TagValues[j]")
            j = j + 1
        }

        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "ProactiveAnomaly.SourceDetails.CloudWatchMetrics").intValue
    while i < count_i {
        jResp.i = i
        StatusCode = jResp.string(of: "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.StatusCode")
        MetricName = jResp.string(of: "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricName")
        Namespace = jResp.string(of: "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Namespace")
        Period = jResp.int(of: "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Period").intValue
        Stat = jResp.string(of: "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Stat")
        Unit = jResp.string(of: "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Unit")
        j = 0
        count_j = jResp.size(ofArray: "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions").intValue
        while j < count_j {
            jResp.j = j
            Name = jResp.string(of: "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Name")
            Value = jResp.string(of: "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Value")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList").intValue
        while j < count_j {
            jResp.j = j
            MetricValue = jResp.int(of: "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].MetricValue").intValue
            Timestamp = jResp.int(of: "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].Timestamp").intValue
            j = j + 1
        }

        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics").intValue
    while i < count_i {
        jResp.i = i
        MetricDisplayName = jResp.string(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricDisplayName")
        v_String = jResp.string(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Filter.string")
        Group = jResp.string(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Group")
        GroupByLimit = jResp.int(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Limit").intValue
        Metric = jResp.string(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Metric")
        Unit = jResp.string(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].Unit")
        j = 0
        count_j = jResp.size(ofArray: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions").intValue
        while j < count_j {
            jResp.j = j
            strVal = jResp.string(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions[j]")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData").intValue
        while j < count_j {
            jResp.j = j
            FilterString = jResp.string(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Filter.string")
            GroupByGroup = jResp.string(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Group")
            GroupByLimit = jResp.int(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Limit").intValue
            MetricQueryMetric = jResp.string(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Metric")
            ReferenceScalarValue = jResp.int(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceScalar.Value").intValue
            Name = jResp.string(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].Name")
            k = 0
            count_k = jResp.size(ofArray: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions").intValue
            while k < count_k {
                jResp.k = k
                strVal = jResp.string(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions[k]")
                k = k + 1
            }

            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly").intValue
        while j < count_j {
            jResp.j = j
            v_Type = jResp.string(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Type")
            Value_int = jResp.int(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Value").intValue
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline").intValue
        while j < count_j {
            jResp.j = j
            v_Type = jResp.string(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Type")
            Value_int = jResp.int(of: "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Value").intValue
            j = j + 1
        }

        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "ReactiveAnomaly.AnomalyResources").intValue
    while i < count_i {
        jResp.i = i
        Name = jResp.string(of: "ReactiveAnomaly.AnomalyResources[i].Name")
        v_Type = jResp.string(of: "ReactiveAnomaly.AnomalyResources[i].Type")
        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "ReactiveAnomaly.ResourceCollection.CloudFormation.StackNames").intValue
    while i < count_i {
        jResp.i = i
        strVal = jResp.string(of: "ReactiveAnomaly.ResourceCollection.CloudFormation.StackNames[i]")
        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "ReactiveAnomaly.ResourceCollection.Tags").intValue
    while i < count_i {
        jResp.i = i
        AppBoundaryKey = jResp.string(of: "ReactiveAnomaly.ResourceCollection.Tags[i].AppBoundaryKey")
        j = 0
        count_j = jResp.size(ofArray: "ReactiveAnomaly.ResourceCollection.Tags[i].TagValues").intValue
        while j < count_j {
            jResp.j = j
            strVal = jResp.string(of: "ReactiveAnomaly.ResourceCollection.Tags[i].TagValues[j]")
            j = j + 1
        }

        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "ReactiveAnomaly.SourceDetails.CloudWatchMetrics").intValue
    while i < count_i {
        jResp.i = i
        MetricDataSummaryStatusCode = jResp.string(of: "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.StatusCode")
        MetricName = jResp.string(of: "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricName")
        Namespace = jResp.string(of: "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Namespace")
        Period = jResp.int(of: "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Period").intValue
        Stat = jResp.string(of: "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Stat")
        Unit = jResp.string(of: "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Unit")
        j = 0
        count_j = jResp.size(ofArray: "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions").intValue
        while j < count_j {
            jResp.j = j
            Name = jResp.string(of: "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Name")
            Value = jResp.string(of: "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Value")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList").intValue
        while j < count_j {
            jResp.j = j
            MetricValue = jResp.int(of: "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].MetricValue").intValue
            Timestamp = jResp.int(of: "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].Timestamp").intValue
            j = j + 1
        }

        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics").intValue
    while i < count_i {
        jResp.i = i
        MetricDisplayName = jResp.string(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricDisplayName")
        FilterString = jResp.string(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Filter.string")
        GroupByGroup = jResp.string(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Group")
        GroupByLimit = jResp.int(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Limit").intValue
        MetricQueryMetric = jResp.string(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Metric")
        Unit = jResp.string(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].Unit")
        j = 0
        count_j = jResp.size(ofArray: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions").intValue
        while j < count_j {
            jResp.j = j
            strVal = jResp.string(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions[j]")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData").intValue
        while j < count_j {
            jResp.j = j
            FilterString = jResp.string(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Filter.string")
            GroupByGroup = jResp.string(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Group")
            GroupByLimit = jResp.int(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Limit").intValue
            MetricQueryMetric = jResp.string(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Metric")
            ReferenceScalarValue = jResp.int(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceScalar.Value").intValue
            Name = jResp.string(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].Name")
            k = 0
            count_k = jResp.size(ofArray: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions").intValue
            while k < count_k {
                jResp.k = k
                strVal = jResp.string(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions[k]")
                k = k + 1
            }

            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly").intValue
        while j < count_j {
            jResp.j = j
            v_Type = jResp.string(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Type")
            Value_int = jResp.int(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Value").intValue
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline").intValue
        while j < count_j {
            jResp.j = j
            v_Type = jResp.string(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Type")
            Value_int = jResp.int(of: "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Value").intValue
            j = j + 1
        }

        i = i + 1
    }

    // 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"
    //   }
    // }

}