DescribeAnomaly TCL Example
load ./chilkat.dll
# This example requires the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
set rest [new_CkRest]
set authAws [new_CkAuthAws]
CkAuthAws_put_AccessKey $authAws "AWS_ACCESS_KEY"
CkAuthAws_put_SecretKey $authAws "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.)
CkAuthAws_put_Region $authAws "us-west-2"
CkAuthAws_put_ServiceName $authAws "devops-guru"
# SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
CkRest_SetAuthAws $rest $authAws
# URL: https://devops-guru.us-west-2.amazonaws.com/
# Use the same region as specified above.
set success [CkRest_Connect $rest "devops-guru.us-west-2.amazonaws.com" 443 1 1]
if {$success != 1} then {
puts "ConnectFailReason: [CkRest_get_ConnectFailReason $rest]"
puts [CkRest_lastErrorText $rest]
delete_CkRest $rest
delete_CkAuthAws $authAws
exit
}
CkRest_AddHeader $rest "Content-Type" "application/x-amz-json-1.1"
CkRest_AddHeader $rest "X-Amz-Target" "DescribeAnomaly"
set sbResponseBody [new_CkStringBuilder]
set success [CkRest_FullRequestNoBodySb $rest "GET" "/anomalies/{Id}" $sbResponseBody]
if {$success != 1} then {
puts [CkRest_lastErrorText $rest]
delete_CkRest $rest
delete_CkAuthAws $authAws
delete_CkStringBuilder $sbResponseBody
exit
}
set respStatusCode [CkRest_get_ResponseStatusCode $rest]
puts "response status code = $respStatusCode"
if {$respStatusCode != 200} then {
puts "Response Header:"
puts [CkRest_responseHeader $rest]
puts "Response Body:"
puts [CkStringBuilder_getAsString $sbResponseBody]
delete_CkRest $rest
delete_CkAuthAws $authAws
delete_CkStringBuilder $sbResponseBody
exit
}
set jResp [new_CkJsonObject]
CkJsonObject_LoadSb $jResp $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
set CloseTime [CkJsonObject_IntOf $jResp "ProactiveAnomaly.AnomalyReportedTimeRange.CloseTime"]
set OpenTime [CkJsonObject_IntOf $jResp "ProactiveAnomaly.AnomalyReportedTimeRange.OpenTime"]
set EndTime [CkJsonObject_IntOf $jResp "ProactiveAnomaly.AnomalyTimeRange.EndTime"]
set StartTime [CkJsonObject_IntOf $jResp "ProactiveAnomaly.AnomalyTimeRange.StartTime"]
set AssociatedInsightId [CkJsonObject_stringOf $jResp "ProactiveAnomaly.AssociatedInsightId"]
set Id [CkJsonObject_stringOf $jResp "ProactiveAnomaly.Id"]
set Limit [CkJsonObject_IntOf $jResp "ProactiveAnomaly.Limit"]
set PredictionTimeRangeEndTime [CkJsonObject_IntOf $jResp "ProactiveAnomaly.PredictionTimeRange.EndTime"]
set PredictionTimeRangeStartTime [CkJsonObject_IntOf $jResp "ProactiveAnomaly.PredictionTimeRange.StartTime"]
set Severity [CkJsonObject_stringOf $jResp "ProactiveAnomaly.Severity"]
set Source [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceMetadata.Source"]
set SourceResourceName [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceMetadata.SourceResourceName"]
set SourceResourceType [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceMetadata.SourceResourceType"]
set Status [CkJsonObject_stringOf $jResp "ProactiveAnomaly.Status"]
set UpdateTime [CkJsonObject_IntOf $jResp "ProactiveAnomaly.UpdateTime"]
set AnomalyReportedTimeRangeCloseTime [CkJsonObject_IntOf $jResp "ReactiveAnomaly.AnomalyReportedTimeRange.CloseTime"]
set AnomalyReportedTimeRangeOpenTime [CkJsonObject_IntOf $jResp "ReactiveAnomaly.AnomalyReportedTimeRange.OpenTime"]
set AnomalyTimeRangeEndTime [CkJsonObject_IntOf $jResp "ReactiveAnomaly.AnomalyTimeRange.EndTime"]
set AnomalyTimeRangeStartTime [CkJsonObject_IntOf $jResp "ReactiveAnomaly.AnomalyTimeRange.StartTime"]
set ReactiveAnomalyAssociatedInsightId [CkJsonObject_stringOf $jResp "ReactiveAnomaly.AssociatedInsightId"]
set CausalAnomalyId [CkJsonObject_stringOf $jResp "ReactiveAnomaly.CausalAnomalyId"]
set Description [CkJsonObject_stringOf $jResp "ReactiveAnomaly.Description"]
set ReactiveAnomalyId [CkJsonObject_stringOf $jResp "ReactiveAnomaly.Id"]
set Name [CkJsonObject_stringOf $jResp "ReactiveAnomaly.Name"]
set ReactiveAnomalySeverity [CkJsonObject_stringOf $jResp "ReactiveAnomaly.Severity"]
set ReactiveAnomalyStatus [CkJsonObject_stringOf $jResp "ReactiveAnomaly.Status"]
set v_Type [CkJsonObject_stringOf $jResp "ReactiveAnomaly.Type"]
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "ProactiveAnomaly.AnomalyResources"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set Name [CkJsonObject_stringOf $jResp "ProactiveAnomaly.AnomalyResources[i].Name"]
set v_Type [CkJsonObject_stringOf $jResp "ProactiveAnomaly.AnomalyResources[i].Type"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "ProactiveAnomaly.ResourceCollection.CloudFormation.StackNames"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set strVal [CkJsonObject_stringOf $jResp "ProactiveAnomaly.ResourceCollection.CloudFormation.StackNames[i]"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "ProactiveAnomaly.ResourceCollection.Tags"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set AppBoundaryKey [CkJsonObject_stringOf $jResp "ProactiveAnomaly.ResourceCollection.Tags[i].AppBoundaryKey"]
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "ProactiveAnomaly.ResourceCollection.Tags[i].TagValues"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "ProactiveAnomaly.ResourceCollection.Tags[i].TagValues[j]"]
set j [expr $j + 1]
}
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "ProactiveAnomaly.SourceDetails.CloudWatchMetrics"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set StatusCode [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.StatusCode"]
set MetricName [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricName"]
set Namespace [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Namespace"]
set Period [CkJsonObject_IntOf $jResp "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Period"]
set Stat [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Stat"]
set Unit [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Unit"]
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set Name [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Name"]
set Value [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Value"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set MetricValue [CkJsonObject_IntOf $jResp "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].MetricValue"]
set Timestamp [CkJsonObject_IntOf $jResp "ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].Timestamp"]
set j [expr $j + 1]
}
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set MetricDisplayName [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricDisplayName"]
set v_String [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Filter.string"]
set Group [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Group"]
set GroupByLimit [CkJsonObject_IntOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Limit"]
set Metric [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Metric"]
set Unit [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].Unit"]
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set FilterString [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Filter.string"]
set GroupByGroup [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Group"]
set GroupByLimit [CkJsonObject_IntOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Limit"]
set MetricQueryMetric [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Metric"]
set ReferenceScalarValue [CkJsonObject_IntOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceScalar.Value"]
set Name [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].Name"]
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set strVal [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions[k]"]
set k [expr $k + 1]
}
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set v_Type [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Type"]
set Value_int [CkJsonObject_IntOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Value"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set v_Type [CkJsonObject_stringOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Type"]
set Value_int [CkJsonObject_IntOf $jResp "ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Value"]
set j [expr $j + 1]
}
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "ReactiveAnomaly.AnomalyResources"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set Name [CkJsonObject_stringOf $jResp "ReactiveAnomaly.AnomalyResources[i].Name"]
set v_Type [CkJsonObject_stringOf $jResp "ReactiveAnomaly.AnomalyResources[i].Type"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "ReactiveAnomaly.ResourceCollection.CloudFormation.StackNames"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set strVal [CkJsonObject_stringOf $jResp "ReactiveAnomaly.ResourceCollection.CloudFormation.StackNames[i]"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "ReactiveAnomaly.ResourceCollection.Tags"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set AppBoundaryKey [CkJsonObject_stringOf $jResp "ReactiveAnomaly.ResourceCollection.Tags[i].AppBoundaryKey"]
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "ReactiveAnomaly.ResourceCollection.Tags[i].TagValues"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "ReactiveAnomaly.ResourceCollection.Tags[i].TagValues[j]"]
set j [expr $j + 1]
}
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "ReactiveAnomaly.SourceDetails.CloudWatchMetrics"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set MetricDataSummaryStatusCode [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.StatusCode"]
set MetricName [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricName"]
set Namespace [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Namespace"]
set Period [CkJsonObject_IntOf $jResp "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Period"]
set Stat [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Stat"]
set Unit [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Unit"]
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set Name [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Name"]
set Value [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Value"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set MetricValue [CkJsonObject_IntOf $jResp "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].MetricValue"]
set Timestamp [CkJsonObject_IntOf $jResp "ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].Timestamp"]
set j [expr $j + 1]
}
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set MetricDisplayName [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricDisplayName"]
set FilterString [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Filter.string"]
set GroupByGroup [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Group"]
set GroupByLimit [CkJsonObject_IntOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Limit"]
set MetricQueryMetric [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Metric"]
set Unit [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].Unit"]
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set FilterString [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Filter.string"]
set GroupByGroup [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Group"]
set GroupByLimit [CkJsonObject_IntOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Limit"]
set MetricQueryMetric [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Metric"]
set ReferenceScalarValue [CkJsonObject_IntOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceScalar.Value"]
set Name [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].Name"]
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set strVal [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions[k]"]
set k [expr $k + 1]
}
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set v_Type [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Type"]
set Value_int [CkJsonObject_IntOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Value"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set v_Type [CkJsonObject_stringOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Type"]
set Value_int [CkJsonObject_IntOf $jResp "ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Value"]
set j [expr $j + 1]
}
set i [expr $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"
# }
# }
delete_CkRest $rest
delete_CkAuthAws $authAws
delete_CkStringBuilder $sbResponseBody
delete_CkJsonObject $jResp