Chilkat Online Tools

DescribeAnomaly Foxpro Example

Amazon DevOps Guru

LOCAL loRest
LOCAL lnSuccess
LOCAL loAuthAws
LOCAL loSbResponseBody
LOCAL lnRespStatusCode
LOCAL loJResp
LOCAL lcStrVal
LOCAL lcAppBoundaryKey
LOCAL j
LOCAL lnCount_j
LOCAL lcStatusCode
LOCAL lcMetricName
LOCAL lcNamespace
LOCAL lnPeriod
LOCAL lcStat
LOCAL lcUnit
LOCAL lcValue
LOCAL lnMetricValue
LOCAL lnTimestamp
LOCAL lcMetricDisplayName
LOCAL lcV_String
LOCAL lcGroup
LOCAL lnGroupByLimit
LOCAL lcMetric
LOCAL lcFilterString
LOCAL lcGroupByGroup
LOCAL lcMetricQueryMetric
LOCAL lnReferenceScalarValue
LOCAL k
LOCAL lnCount_k
LOCAL lnValue_int
LOCAL lcMetricDataSummaryStatusCode
LOCAL lnCloseTime
LOCAL lnOpenTime
LOCAL lnEndTime
LOCAL lnStartTime
LOCAL lcAssociatedInsightId
LOCAL lcId
LOCAL lnLimit
LOCAL lnPredictionTimeRangeEndTime
LOCAL lnPredictionTimeRangeStartTime
LOCAL lcSeverity
LOCAL lcSource
LOCAL lcSourceResourceName
LOCAL lcSourceResourceType
LOCAL lcStatus
LOCAL lnUpdateTime
LOCAL lnAnomalyReportedTimeRangeCloseTime
LOCAL lnAnomalyReportedTimeRangeOpenTime
LOCAL lnAnomalyTimeRangeEndTime
LOCAL lnAnomalyTimeRangeStartTime
LOCAL lcReactiveAnomalyAssociatedInsightId
LOCAL lcCausalAnomalyId
LOCAL lcDescription
LOCAL lcReactiveAnomalyId
LOCAL lcName
LOCAL lcReactiveAnomalySeverity
LOCAL lcReactiveAnomalyStatus
LOCAL lcV_Type
LOCAL i
LOCAL lnCount_i

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

loRest = CreateObject('Chilkat_9_5_0.Rest')

loAuthAws = CreateObject('Chilkat_9_5_0.AuthAws')
loAuthAws.AccessKey = "AWS_ACCESS_KEY"
loAuthAws.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.)
loAuthAws.Region = "us-west-2"
loAuthAws.ServiceName = "devops-guru"
* SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
loRest.SetAuthAws(loAuthAws)

* URL: https://devops-guru.us-west-2.amazonaws.com/
* Use the same region as specified above.
lnSuccess = loRest.Connect("devops-guru.us-west-2.amazonaws.com",443,1,1)
IF (lnSuccess <> 1) THEN
    ? "ConnectFailReason: " + STR(loRest.ConnectFailReason)
    ? loRest.LastErrorText
    RELEASE loRest
    RELEASE loAuthAws
    CANCEL
ENDIF

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

loSbResponseBody = CreateObject('Chilkat_9_5_0.StringBuilder')
lnSuccess = loRest.FullRequestNoBodySb("GET","/anomalies/{Id}",loSbResponseBody)
IF (lnSuccess <> 1) THEN
    ? loRest.LastErrorText
    RELEASE loRest
    RELEASE loAuthAws
    RELEASE loSbResponseBody
    CANCEL
ENDIF

lnRespStatusCode = loRest.ResponseStatusCode
? "response status code = " + STR(lnRespStatusCode)
IF (lnRespStatusCode <> 200) THEN
    ? "Response Header:"
    ? loRest.ResponseHeader
    ? "Response Body:"
    ? loSbResponseBody.GetAsString()
    RELEASE loRest
    RELEASE loAuthAws
    RELEASE loSbResponseBody
    CANCEL
ENDIF

loJResp = CreateObject('Chilkat_9_5_0.JsonObject')
loJResp.LoadSb(loSbResponseBody)

* 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

lnCloseTime = loJResp.IntOf("ProactiveAnomaly.AnomalyReportedTimeRange.CloseTime")
lnOpenTime = loJResp.IntOf("ProactiveAnomaly.AnomalyReportedTimeRange.OpenTime")
lnEndTime = loJResp.IntOf("ProactiveAnomaly.AnomalyTimeRange.EndTime")
lnStartTime = loJResp.IntOf("ProactiveAnomaly.AnomalyTimeRange.StartTime")
lcAssociatedInsightId = loJResp.StringOf("ProactiveAnomaly.AssociatedInsightId")
lcId = loJResp.StringOf("ProactiveAnomaly.Id")
lnLimit = loJResp.IntOf("ProactiveAnomaly.Limit")
lnPredictionTimeRangeEndTime = loJResp.IntOf("ProactiveAnomaly.PredictionTimeRange.EndTime")
lnPredictionTimeRangeStartTime = loJResp.IntOf("ProactiveAnomaly.PredictionTimeRange.StartTime")
lcSeverity = loJResp.StringOf("ProactiveAnomaly.Severity")
lcSource = loJResp.StringOf("ProactiveAnomaly.SourceMetadata.Source")
lcSourceResourceName = loJResp.StringOf("ProactiveAnomaly.SourceMetadata.SourceResourceName")
lcSourceResourceType = loJResp.StringOf("ProactiveAnomaly.SourceMetadata.SourceResourceType")
lcStatus = loJResp.StringOf("ProactiveAnomaly.Status")
lnUpdateTime = loJResp.IntOf("ProactiveAnomaly.UpdateTime")
lnAnomalyReportedTimeRangeCloseTime = loJResp.IntOf("ReactiveAnomaly.AnomalyReportedTimeRange.CloseTime")
lnAnomalyReportedTimeRangeOpenTime = loJResp.IntOf("ReactiveAnomaly.AnomalyReportedTimeRange.OpenTime")
lnAnomalyTimeRangeEndTime = loJResp.IntOf("ReactiveAnomaly.AnomalyTimeRange.EndTime")
lnAnomalyTimeRangeStartTime = loJResp.IntOf("ReactiveAnomaly.AnomalyTimeRange.StartTime")
lcReactiveAnomalyAssociatedInsightId = loJResp.StringOf("ReactiveAnomaly.AssociatedInsightId")
lcCausalAnomalyId = loJResp.StringOf("ReactiveAnomaly.CausalAnomalyId")
lcDescription = loJResp.StringOf("ReactiveAnomaly.Description")
lcReactiveAnomalyId = loJResp.StringOf("ReactiveAnomaly.Id")
lcName = loJResp.StringOf("ReactiveAnomaly.Name")
lcReactiveAnomalySeverity = loJResp.StringOf("ReactiveAnomaly.Severity")
lcReactiveAnomalyStatus = loJResp.StringOf("ReactiveAnomaly.Status")
lcV_Type = loJResp.StringOf("ReactiveAnomaly.Type")
i = 0
lnCount_i = loJResp.SizeOfArray("ProactiveAnomaly.AnomalyResources")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcName = loJResp.StringOf("ProactiveAnomaly.AnomalyResources[i].Name")
    lcV_Type = loJResp.StringOf("ProactiveAnomaly.AnomalyResources[i].Type")
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("ProactiveAnomaly.ResourceCollection.CloudFormation.StackNames")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcStrVal = loJResp.StringOf("ProactiveAnomaly.ResourceCollection.CloudFormation.StackNames[i]")
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("ProactiveAnomaly.ResourceCollection.Tags")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcAppBoundaryKey = loJResp.StringOf("ProactiveAnomaly.ResourceCollection.Tags[i].AppBoundaryKey")
    j = 0
    lnCount_j = loJResp.SizeOfArray("ProactiveAnomaly.ResourceCollection.Tags[i].TagValues")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcStrVal = loJResp.StringOf("ProactiveAnomaly.ResourceCollection.Tags[i].TagValues[j]")
        j = j + 1
    ENDDO
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("ProactiveAnomaly.SourceDetails.CloudWatchMetrics")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcStatusCode = loJResp.StringOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.StatusCode")
    lcMetricName = loJResp.StringOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricName")
    lcNamespace = loJResp.StringOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Namespace")
    lnPeriod = loJResp.IntOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Period")
    lcStat = loJResp.StringOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Stat")
    lcUnit = loJResp.StringOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Unit")
    j = 0
    lnCount_j = loJResp.SizeOfArray("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcName = loJResp.StringOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Name")
        lcValue = loJResp.StringOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Value")
        j = j + 1
    ENDDO
    j = 0
    lnCount_j = loJResp.SizeOfArray("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lnMetricValue = loJResp.IntOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].MetricValue")
        lnTimestamp = loJResp.IntOf("ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].Timestamp")
        j = j + 1
    ENDDO
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcMetricDisplayName = loJResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricDisplayName")
    lcV_String = loJResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Filter.string")
    lcGroup = loJResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Group")
    lnGroupByLimit = loJResp.IntOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Limit")
    lcMetric = loJResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Metric")
    lcUnit = loJResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].Unit")
    j = 0
    lnCount_j = loJResp.SizeOfArray("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcStrVal = loJResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions[j]")
        j = j + 1
    ENDDO
    j = 0
    lnCount_j = loJResp.SizeOfArray("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcFilterString = loJResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Filter.string")
        lcGroupByGroup = loJResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Group")
        lnGroupByLimit = loJResp.IntOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Limit")
        lcMetricQueryMetric = loJResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Metric")
        lnReferenceScalarValue = loJResp.IntOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceScalar.Value")
        lcName = loJResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].Name")
        k = 0
        lnCount_k = loJResp.SizeOfArray("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions")
        DO WHILE k < lnCount_k
            loJResp.K = k
            lcStrVal = loJResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions[k]")
            k = k + 1
        ENDDO
        j = j + 1
    ENDDO
    j = 0
    lnCount_j = loJResp.SizeOfArray("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcV_Type = loJResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Type")
        lnValue_int = loJResp.IntOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Value")
        j = j + 1
    ENDDO
    j = 0
    lnCount_j = loJResp.SizeOfArray("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcV_Type = loJResp.StringOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Type")
        lnValue_int = loJResp.IntOf("ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Value")
        j = j + 1
    ENDDO
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("ReactiveAnomaly.AnomalyResources")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcName = loJResp.StringOf("ReactiveAnomaly.AnomalyResources[i].Name")
    lcV_Type = loJResp.StringOf("ReactiveAnomaly.AnomalyResources[i].Type")
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("ReactiveAnomaly.ResourceCollection.CloudFormation.StackNames")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcStrVal = loJResp.StringOf("ReactiveAnomaly.ResourceCollection.CloudFormation.StackNames[i]")
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("ReactiveAnomaly.ResourceCollection.Tags")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcAppBoundaryKey = loJResp.StringOf("ReactiveAnomaly.ResourceCollection.Tags[i].AppBoundaryKey")
    j = 0
    lnCount_j = loJResp.SizeOfArray("ReactiveAnomaly.ResourceCollection.Tags[i].TagValues")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcStrVal = loJResp.StringOf("ReactiveAnomaly.ResourceCollection.Tags[i].TagValues[j]")
        j = j + 1
    ENDDO
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("ReactiveAnomaly.SourceDetails.CloudWatchMetrics")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcMetricDataSummaryStatusCode = loJResp.StringOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.StatusCode")
    lcMetricName = loJResp.StringOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricName")
    lcNamespace = loJResp.StringOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Namespace")
    lnPeriod = loJResp.IntOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Period")
    lcStat = loJResp.StringOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Stat")
    lcUnit = loJResp.StringOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Unit")
    j = 0
    lnCount_j = loJResp.SizeOfArray("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcName = loJResp.StringOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Name")
        lcValue = loJResp.StringOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Value")
        j = j + 1
    ENDDO
    j = 0
    lnCount_j = loJResp.SizeOfArray("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lnMetricValue = loJResp.IntOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].MetricValue")
        lnTimestamp = loJResp.IntOf("ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].Timestamp")
        j = j + 1
    ENDDO
    i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics")
DO WHILE i < lnCount_i
    loJResp.I = i
    lcMetricDisplayName = loJResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricDisplayName")
    lcFilterString = loJResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Filter.string")
    lcGroupByGroup = loJResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Group")
    lnGroupByLimit = loJResp.IntOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Limit")
    lcMetricQueryMetric = loJResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Metric")
    lcUnit = loJResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].Unit")
    j = 0
    lnCount_j = loJResp.SizeOfArray("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcStrVal = loJResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions[j]")
        j = j + 1
    ENDDO
    j = 0
    lnCount_j = loJResp.SizeOfArray("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcFilterString = loJResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Filter.string")
        lcGroupByGroup = loJResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Group")
        lnGroupByLimit = loJResp.IntOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Limit")
        lcMetricQueryMetric = loJResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Metric")
        lnReferenceScalarValue = loJResp.IntOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceScalar.Value")
        lcName = loJResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].Name")
        k = 0
        lnCount_k = loJResp.SizeOfArray("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions")
        DO WHILE k < lnCount_k
            loJResp.K = k
            lcStrVal = loJResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions[k]")
            k = k + 1
        ENDDO
        j = j + 1
    ENDDO
    j = 0
    lnCount_j = loJResp.SizeOfArray("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcV_Type = loJResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Type")
        lnValue_int = loJResp.IntOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Value")
        j = j + 1
    ENDDO
    j = 0
    lnCount_j = loJResp.SizeOfArray("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline")
    DO WHILE j < lnCount_j
        loJResp.J = j
        lcV_Type = loJResp.StringOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Type")
        lnValue_int = loJResp.IntOf("ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Value")
        j = j + 1
    ENDDO
    i = i + 1
ENDDO

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

RELEASE loRest
RELEASE loAuthAws
RELEASE loSbResponseBody
RELEASE loJResp