Chilkat Online Tools

DescribeAnomaly unicodeCpp Example

Amazon DevOps Guru

#include <CkRestW.h>
#include <CkAuthAwsW.h>
#include <CkStringBuilderW.h>
#include <CkJsonObjectW.h>

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

    CkRestW rest;
    bool success;

    CkAuthAwsW authAws;
    authAws.put_AccessKey(L"AWS_ACCESS_KEY");
    authAws.put_SecretKey(L"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.put_Region(L"us-west-2");
    authAws.put_ServiceName(L"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(L"devops-guru.us-west-2.amazonaws.com",443,true,true);
    if (success != true) {
        wprintf(L"ConnectFailReason: %d\n",rest.get_ConnectFailReason());
        wprintf(L"%s\n",rest.lastErrorText());
        return;
    }

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

    CkStringBuilderW sbResponseBody;
    success = rest.FullRequestNoBodySb(L"GET",L"/anomalies/{Id}",sbResponseBody);
    if (success != true) {
        wprintf(L"%s\n",rest.lastErrorText());
        return;
    }

    int respStatusCode = rest.get_ResponseStatusCode();
    wprintf(L"response status code = %d\n",respStatusCode);
    if (respStatusCode != 200) {
        wprintf(L"Response Header:\n");
        wprintf(L"%s\n",rest.responseHeader());
        wprintf(L"Response Body:\n");
        wprintf(L"%s\n",sbResponseBody.getAsString());
        return;
    }

    CkJsonObjectW jResp;
    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

    // Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.
    // See this example explaining how this memory should be used: const char * functions.

    const wchar_t *strVal = 0;
    const wchar_t *AppBoundaryKey = 0;
    int j;
    int count_j;
    const wchar_t *StatusCode = 0;
    const wchar_t *MetricName = 0;
    const wchar_t *Namespace = 0;
    int Period;
    const wchar_t *Stat = 0;
    const wchar_t *Unit = 0;
    const wchar_t *Value = 0;
    int MetricValue;
    int Timestamp;
    const wchar_t *MetricDisplayName = 0;
    const wchar_t *v_String = 0;
    const wchar_t *Group = 0;
    int GroupByLimit;
    const wchar_t *Metric = 0;
    const wchar_t *FilterString = 0;
    const wchar_t *GroupByGroup = 0;
    const wchar_t *MetricQueryMetric = 0;
    int ReferenceScalarValue;
    int k;
    int count_k;
    int Value_int;
    const wchar_t *MetricDataSummaryStatusCode = 0;

    int CloseTime = jResp.IntOf(L"ProactiveAnomaly.AnomalyReportedTimeRange.CloseTime");
    int OpenTime = jResp.IntOf(L"ProactiveAnomaly.AnomalyReportedTimeRange.OpenTime");
    int EndTime = jResp.IntOf(L"ProactiveAnomaly.AnomalyTimeRange.EndTime");
    int StartTime = jResp.IntOf(L"ProactiveAnomaly.AnomalyTimeRange.StartTime");
    const wchar_t *AssociatedInsightId = jResp.stringOf(L"ProactiveAnomaly.AssociatedInsightId");
    const wchar_t *Id = jResp.stringOf(L"ProactiveAnomaly.Id");
    int Limit = jResp.IntOf(L"ProactiveAnomaly.Limit");
    int PredictionTimeRangeEndTime = jResp.IntOf(L"ProactiveAnomaly.PredictionTimeRange.EndTime");
    int PredictionTimeRangeStartTime = jResp.IntOf(L"ProactiveAnomaly.PredictionTimeRange.StartTime");
    const wchar_t *Severity = jResp.stringOf(L"ProactiveAnomaly.Severity");
    const wchar_t *Source = jResp.stringOf(L"ProactiveAnomaly.SourceMetadata.Source");
    const wchar_t *SourceResourceName = jResp.stringOf(L"ProactiveAnomaly.SourceMetadata.SourceResourceName");
    const wchar_t *SourceResourceType = jResp.stringOf(L"ProactiveAnomaly.SourceMetadata.SourceResourceType");
    const wchar_t *Status = jResp.stringOf(L"ProactiveAnomaly.Status");
    int UpdateTime = jResp.IntOf(L"ProactiveAnomaly.UpdateTime");
    int AnomalyReportedTimeRangeCloseTime = jResp.IntOf(L"ReactiveAnomaly.AnomalyReportedTimeRange.CloseTime");
    int AnomalyReportedTimeRangeOpenTime = jResp.IntOf(L"ReactiveAnomaly.AnomalyReportedTimeRange.OpenTime");
    int AnomalyTimeRangeEndTime = jResp.IntOf(L"ReactiveAnomaly.AnomalyTimeRange.EndTime");
    int AnomalyTimeRangeStartTime = jResp.IntOf(L"ReactiveAnomaly.AnomalyTimeRange.StartTime");
    const wchar_t *ReactiveAnomalyAssociatedInsightId = jResp.stringOf(L"ReactiveAnomaly.AssociatedInsightId");
    const wchar_t *CausalAnomalyId = jResp.stringOf(L"ReactiveAnomaly.CausalAnomalyId");
    const wchar_t *Description = jResp.stringOf(L"ReactiveAnomaly.Description");
    const wchar_t *ReactiveAnomalyId = jResp.stringOf(L"ReactiveAnomaly.Id");
    const wchar_t *Name = jResp.stringOf(L"ReactiveAnomaly.Name");
    const wchar_t *ReactiveAnomalySeverity = jResp.stringOf(L"ReactiveAnomaly.Severity");
    const wchar_t *ReactiveAnomalyStatus = jResp.stringOf(L"ReactiveAnomaly.Status");
    const wchar_t *v_Type = jResp.stringOf(L"ReactiveAnomaly.Type");
    int i = 0;
    int count_i = jResp.SizeOfArray(L"ProactiveAnomaly.AnomalyResources");
    while (i < count_i) {
        jResp.put_I(i);
        Name = jResp.stringOf(L"ProactiveAnomaly.AnomalyResources[i].Name");
        v_Type = jResp.stringOf(L"ProactiveAnomaly.AnomalyResources[i].Type");
        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"ProactiveAnomaly.ResourceCollection.CloudFormation.StackNames");
    while (i < count_i) {
        jResp.put_I(i);
        strVal = jResp.stringOf(L"ProactiveAnomaly.ResourceCollection.CloudFormation.StackNames[i]");
        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"ProactiveAnomaly.ResourceCollection.Tags");
    while (i < count_i) {
        jResp.put_I(i);
        AppBoundaryKey = jResp.stringOf(L"ProactiveAnomaly.ResourceCollection.Tags[i].AppBoundaryKey");
        j = 0;
        count_j = jResp.SizeOfArray(L"ProactiveAnomaly.ResourceCollection.Tags[i].TagValues");
        while (j < count_j) {
            jResp.put_J(j);
            strVal = jResp.stringOf(L"ProactiveAnomaly.ResourceCollection.Tags[i].TagValues[j]");
            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics");
    while (i < count_i) {
        jResp.put_I(i);
        StatusCode = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.StatusCode");
        MetricName = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricName");
        Namespace = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Namespace");
        Period = jResp.IntOf(L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Period");
        Stat = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Stat");
        Unit = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Unit");
        j = 0;
        count_j = jResp.SizeOfArray(L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions");
        while (j < count_j) {
            jResp.put_J(j);
            Name = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Name");
            Value = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Value");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList");
        while (j < count_j) {
            jResp.put_J(j);
            MetricValue = jResp.IntOf(L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].MetricValue");
            Timestamp = jResp.IntOf(L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].Timestamp");
            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics");
    while (i < count_i) {
        jResp.put_I(i);
        MetricDisplayName = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricDisplayName");
        v_String = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Filter.string");
        Group = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Group");
        GroupByLimit = jResp.IntOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Limit");
        Metric = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Metric");
        Unit = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].Unit");
        j = 0;
        count_j = jResp.SizeOfArray(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions");
        while (j < count_j) {
            jResp.put_J(j);
            strVal = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions[j]");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData");
        while (j < count_j) {
            jResp.put_J(j);
            FilterString = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Filter.string");
            GroupByGroup = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Group");
            GroupByLimit = jResp.IntOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Limit");
            MetricQueryMetric = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Metric");
            ReferenceScalarValue = jResp.IntOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceScalar.Value");
            Name = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].Name");
            k = 0;
            count_k = jResp.SizeOfArray(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions");
            while (k < count_k) {
                jResp.put_K(k);
                strVal = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions[k]");
                k = k + 1;
            }

            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly");
        while (j < count_j) {
            jResp.put_J(j);
            v_Type = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Type");
            Value_int = jResp.IntOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Value");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline");
        while (j < count_j) {
            jResp.put_J(j);
            v_Type = jResp.stringOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Type");
            Value_int = jResp.IntOf(L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Value");
            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"ReactiveAnomaly.AnomalyResources");
    while (i < count_i) {
        jResp.put_I(i);
        Name = jResp.stringOf(L"ReactiveAnomaly.AnomalyResources[i].Name");
        v_Type = jResp.stringOf(L"ReactiveAnomaly.AnomalyResources[i].Type");
        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"ReactiveAnomaly.ResourceCollection.CloudFormation.StackNames");
    while (i < count_i) {
        jResp.put_I(i);
        strVal = jResp.stringOf(L"ReactiveAnomaly.ResourceCollection.CloudFormation.StackNames[i]");
        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"ReactiveAnomaly.ResourceCollection.Tags");
    while (i < count_i) {
        jResp.put_I(i);
        AppBoundaryKey = jResp.stringOf(L"ReactiveAnomaly.ResourceCollection.Tags[i].AppBoundaryKey");
        j = 0;
        count_j = jResp.SizeOfArray(L"ReactiveAnomaly.ResourceCollection.Tags[i].TagValues");
        while (j < count_j) {
            jResp.put_J(j);
            strVal = jResp.stringOf(L"ReactiveAnomaly.ResourceCollection.Tags[i].TagValues[j]");
            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics");
    while (i < count_i) {
        jResp.put_I(i);
        MetricDataSummaryStatusCode = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.StatusCode");
        MetricName = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricName");
        Namespace = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Namespace");
        Period = jResp.IntOf(L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Period");
        Stat = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Stat");
        Unit = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Unit");
        j = 0;
        count_j = jResp.SizeOfArray(L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions");
        while (j < count_j) {
            jResp.put_J(j);
            Name = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Name");
            Value = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Value");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList");
        while (j < count_j) {
            jResp.put_J(j);
            MetricValue = jResp.IntOf(L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].MetricValue");
            Timestamp = jResp.IntOf(L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].Timestamp");
            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics");
    while (i < count_i) {
        jResp.put_I(i);
        MetricDisplayName = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricDisplayName");
        FilterString = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Filter.string");
        GroupByGroup = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Group");
        GroupByLimit = jResp.IntOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Limit");
        MetricQueryMetric = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Metric");
        Unit = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].Unit");
        j = 0;
        count_j = jResp.SizeOfArray(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions");
        while (j < count_j) {
            jResp.put_J(j);
            strVal = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions[j]");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData");
        while (j < count_j) {
            jResp.put_J(j);
            FilterString = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Filter.string");
            GroupByGroup = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Group");
            GroupByLimit = jResp.IntOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Limit");
            MetricQueryMetric = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Metric");
            ReferenceScalarValue = jResp.IntOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceScalar.Value");
            Name = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].Name");
            k = 0;
            count_k = jResp.SizeOfArray(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions");
            while (k < count_k) {
                jResp.put_K(k);
                strVal = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions[k]");
                k = k + 1;
            }

            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly");
        while (j < count_j) {
            jResp.put_J(j);
            v_Type = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Type");
            Value_int = jResp.IntOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Value");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline");
        while (j < count_j) {
            jResp.put_J(j);
            v_Type = jResp.stringOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Type");
            Value_int = jResp.IntOf(L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Value");
            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"
    //   }
    // }
    }