DescribeAnomaly unicodeC Example
#include <C_CkRestW.h>
#include <C_CkAuthAwsW.h>
#include <C_CkStringBuilderW.h>
#include <C_CkJsonObjectW.h>
void ChilkatSample(void)
{
HCkRestW rest;
BOOL success;
HCkAuthAwsW authAws;
HCkStringBuilderW sbResponseBody;
int respStatusCode;
HCkJsonObjectW jResp;
const wchar_t *strVal;
const wchar_t *AppBoundaryKey;
int j;
int count_j;
const wchar_t *StatusCode;
const wchar_t *MetricName;
const wchar_t *Namespace;
int Period;
const wchar_t *Stat;
const wchar_t *Unit;
const wchar_t *Value;
int MetricValue;
int Timestamp;
const wchar_t *MetricDisplayName;
const wchar_t *v_String;
const wchar_t *Group;
int GroupByLimit;
const wchar_t *Metric;
const wchar_t *FilterString;
const wchar_t *GroupByGroup;
const wchar_t *MetricQueryMetric;
int ReferenceScalarValue;
int k;
int count_k;
int Value_int;
const wchar_t *MetricDataSummaryStatusCode;
int CloseTime;
int OpenTime;
int EndTime;
int StartTime;
const wchar_t *AssociatedInsightId;
const wchar_t *Id;
int Limit;
int PredictionTimeRangeEndTime;
int PredictionTimeRangeStartTime;
const wchar_t *Severity;
const wchar_t *Source;
const wchar_t *SourceResourceName;
const wchar_t *SourceResourceType;
const wchar_t *Status;
int UpdateTime;
int AnomalyReportedTimeRangeCloseTime;
int AnomalyReportedTimeRangeOpenTime;
int AnomalyTimeRangeEndTime;
int AnomalyTimeRangeStartTime;
const wchar_t *ReactiveAnomalyAssociatedInsightId;
const wchar_t *CausalAnomalyId;
const wchar_t *Description;
const wchar_t *ReactiveAnomalyId;
const wchar_t *Name;
const wchar_t *ReactiveAnomalySeverity;
const wchar_t *ReactiveAnomalyStatus;
const wchar_t *v_Type;
int i;
int count_i;
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
rest = CkRestW_Create();
authAws = CkAuthAwsW_Create();
CkAuthAwsW_putAccessKey(authAws,L"AWS_ACCESS_KEY");
CkAuthAwsW_putSecretKey(authAws,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.)
CkAuthAwsW_putRegion(authAws,L"us-west-2");
CkAuthAwsW_putServiceName(authAws,L"devops-guru");
// SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
CkRestW_SetAuthAws(rest,authAws);
// URL: https://devops-guru.us-west-2.amazonaws.com/
// Use the same region as specified above.
success = CkRestW_Connect(rest,L"devops-guru.us-west-2.amazonaws.com",443,TRUE,TRUE);
if (success != TRUE) {
wprintf(L"ConnectFailReason: %d\n",CkRestW_getConnectFailReason(rest));
wprintf(L"%s\n",CkRestW_lastErrorText(rest));
CkRestW_Dispose(rest);
CkAuthAwsW_Dispose(authAws);
return;
}
CkRestW_AddHeader(rest,L"Content-Type",L"application/x-amz-json-1.1");
CkRestW_AddHeader(rest,L"X-Amz-Target",L"DescribeAnomaly");
sbResponseBody = CkStringBuilderW_Create();
success = CkRestW_FullRequestNoBodySb(rest,L"GET",L"/anomalies/{Id}",sbResponseBody);
if (success != TRUE) {
wprintf(L"%s\n",CkRestW_lastErrorText(rest));
CkRestW_Dispose(rest);
CkAuthAwsW_Dispose(authAws);
CkStringBuilderW_Dispose(sbResponseBody);
return;
}
respStatusCode = CkRestW_getResponseStatusCode(rest);
wprintf(L"response status code = %d\n",respStatusCode);
if (respStatusCode != 200) {
wprintf(L"Response Header:\n");
wprintf(L"%s\n",CkRestW_responseHeader(rest));
wprintf(L"Response Body:\n");
wprintf(L"%s\n",CkStringBuilderW_getAsString(sbResponseBody));
CkRestW_Dispose(rest);
CkAuthAwsW_Dispose(authAws);
CkStringBuilderW_Dispose(sbResponseBody);
return;
}
jResp = CkJsonObjectW_Create();
CkJsonObjectW_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
// 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.
CloseTime = CkJsonObjectW_IntOf(jResp,L"ProactiveAnomaly.AnomalyReportedTimeRange.CloseTime");
OpenTime = CkJsonObjectW_IntOf(jResp,L"ProactiveAnomaly.AnomalyReportedTimeRange.OpenTime");
EndTime = CkJsonObjectW_IntOf(jResp,L"ProactiveAnomaly.AnomalyTimeRange.EndTime");
StartTime = CkJsonObjectW_IntOf(jResp,L"ProactiveAnomaly.AnomalyTimeRange.StartTime");
AssociatedInsightId = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.AssociatedInsightId");
Id = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.Id");
Limit = CkJsonObjectW_IntOf(jResp,L"ProactiveAnomaly.Limit");
PredictionTimeRangeEndTime = CkJsonObjectW_IntOf(jResp,L"ProactiveAnomaly.PredictionTimeRange.EndTime");
PredictionTimeRangeStartTime = CkJsonObjectW_IntOf(jResp,L"ProactiveAnomaly.PredictionTimeRange.StartTime");
Severity = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.Severity");
Source = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceMetadata.Source");
SourceResourceName = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceMetadata.SourceResourceName");
SourceResourceType = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceMetadata.SourceResourceType");
Status = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.Status");
UpdateTime = CkJsonObjectW_IntOf(jResp,L"ProactiveAnomaly.UpdateTime");
AnomalyReportedTimeRangeCloseTime = CkJsonObjectW_IntOf(jResp,L"ReactiveAnomaly.AnomalyReportedTimeRange.CloseTime");
AnomalyReportedTimeRangeOpenTime = CkJsonObjectW_IntOf(jResp,L"ReactiveAnomaly.AnomalyReportedTimeRange.OpenTime");
AnomalyTimeRangeEndTime = CkJsonObjectW_IntOf(jResp,L"ReactiveAnomaly.AnomalyTimeRange.EndTime");
AnomalyTimeRangeStartTime = CkJsonObjectW_IntOf(jResp,L"ReactiveAnomaly.AnomalyTimeRange.StartTime");
ReactiveAnomalyAssociatedInsightId = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.AssociatedInsightId");
CausalAnomalyId = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.CausalAnomalyId");
Description = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.Description");
ReactiveAnomalyId = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.Id");
Name = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.Name");
ReactiveAnomalySeverity = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.Severity");
ReactiveAnomalyStatus = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.Status");
v_Type = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.Type");
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"ProactiveAnomaly.AnomalyResources");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
Name = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.AnomalyResources[i].Name");
v_Type = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.AnomalyResources[i].Type");
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"ProactiveAnomaly.ResourceCollection.CloudFormation.StackNames");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
strVal = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.ResourceCollection.CloudFormation.StackNames[i]");
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"ProactiveAnomaly.ResourceCollection.Tags");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
AppBoundaryKey = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.ResourceCollection.Tags[i].AppBoundaryKey");
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"ProactiveAnomaly.ResourceCollection.Tags[i].TagValues");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
strVal = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.ResourceCollection.Tags[i].TagValues[j]");
j = j + 1;
}
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
StatusCode = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.StatusCode");
MetricName = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricName");
Namespace = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Namespace");
Period = CkJsonObjectW_IntOf(jResp,L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Period");
Stat = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Stat");
Unit = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Unit");
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
Name = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Name");
Value = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Value");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
MetricValue = CkJsonObjectW_IntOf(jResp,L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].MetricValue");
Timestamp = CkJsonObjectW_IntOf(jResp,L"ProactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].Timestamp");
j = j + 1;
}
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
MetricDisplayName = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricDisplayName");
v_String = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Filter.string");
Group = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Group");
GroupByLimit = CkJsonObjectW_IntOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Limit");
Metric = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Metric");
Unit = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].Unit");
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
strVal = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions[j]");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
FilterString = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Filter.string");
GroupByGroup = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Group");
GroupByLimit = CkJsonObjectW_IntOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Limit");
MetricQueryMetric = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Metric");
ReferenceScalarValue = CkJsonObjectW_IntOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceScalar.Value");
Name = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].Name");
k = 0;
count_k = CkJsonObjectW_SizeOfArray(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions");
while (k < count_k) {
CkJsonObjectW_putK(jResp,k);
strVal = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions[k]");
k = k + 1;
}
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
v_Type = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Type");
Value_int = CkJsonObjectW_IntOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Value");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
v_Type = CkJsonObjectW_stringOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Type");
Value_int = CkJsonObjectW_IntOf(jResp,L"ProactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Value");
j = j + 1;
}
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"ReactiveAnomaly.AnomalyResources");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
Name = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.AnomalyResources[i].Name");
v_Type = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.AnomalyResources[i].Type");
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"ReactiveAnomaly.ResourceCollection.CloudFormation.StackNames");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
strVal = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.ResourceCollection.CloudFormation.StackNames[i]");
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"ReactiveAnomaly.ResourceCollection.Tags");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
AppBoundaryKey = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.ResourceCollection.Tags[i].AppBoundaryKey");
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"ReactiveAnomaly.ResourceCollection.Tags[i].TagValues");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
strVal = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.ResourceCollection.Tags[i].TagValues[j]");
j = j + 1;
}
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
MetricDataSummaryStatusCode = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.StatusCode");
MetricName = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricName");
Namespace = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Namespace");
Period = CkJsonObjectW_IntOf(jResp,L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Period");
Stat = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Stat");
Unit = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Unit");
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
Name = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Name");
Value = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].Dimensions[j].Value");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
MetricValue = CkJsonObjectW_IntOf(jResp,L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].MetricValue");
Timestamp = CkJsonObjectW_IntOf(jResp,L"ReactiveAnomaly.SourceDetails.CloudWatchMetrics[i].MetricDataSummary.TimestampMetricValuePairList[j].Timestamp");
j = j + 1;
}
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
MetricDisplayName = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricDisplayName");
FilterString = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Filter.string");
GroupByGroup = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Group");
GroupByLimit = CkJsonObjectW_IntOf(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Limit");
MetricQueryMetric = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.Metric");
Unit = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].Unit");
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
strVal = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].MetricQuery.GroupBy.Dimensions[j]");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
FilterString = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Filter.string");
GroupByGroup = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Group");
GroupByLimit = CkJsonObjectW_IntOf(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Limit");
MetricQueryMetric = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.Metric");
ReferenceScalarValue = CkJsonObjectW_IntOf(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceScalar.Value");
Name = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].Name");
k = 0;
count_k = CkJsonObjectW_SizeOfArray(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions");
while (k < count_k) {
CkJsonObjectW_putK(jResp,k);
strVal = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].ReferenceData[j].ComparisonValues.ReferenceMetric.MetricQuery.GroupBy.Dimensions[k]");
k = k + 1;
}
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
v_Type = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Type");
Value_int = CkJsonObjectW_IntOf(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtAnomaly[j].Value");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
v_Type = CkJsonObjectW_stringOf(jResp,L"ReactiveAnomaly.SourceDetails.PerformanceInsightsMetrics[i].StatsAtBaseline[j].Type");
Value_int = CkJsonObjectW_IntOf(jResp,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"
// }
// }
CkRestW_Dispose(rest);
CkAuthAwsW_Dispose(authAws);
CkStringBuilderW_Dispose(sbResponseBody);
CkJsonObjectW_Dispose(jResp);
}