RetryBuildBatch unicodeC Example
#include <C_CkRestW.h>
#include <C_CkAuthAwsW.h>
#include <C_CkJsonObjectW.h>
#include <C_CkStringBuilderW.h>
void ChilkatSample(void)
{
HCkRestW rest;
BOOL success;
HCkAuthAwsW authAws;
HCkJsonObjectW json;
HCkStringBuilderW sbRequestBody;
HCkStringBuilderW sbResponseBody;
int respStatusCode;
HCkJsonObjectW jResp;
const wchar_t *strVal;
const wchar_t *currentBuildSummaryArn;
const wchar_t *BuildStatus;
const wchar_t *Identifier;
const wchar_t *PrimaryArtifactLocation;
const wchar_t *PrimaryArtifactType;
int RequestedOn;
const wchar_t *identifier;
int ignoreFailure;
int j;
int count_j;
const wchar_t *location;
const wchar_t *v_type;
const wchar_t *arn;
const wchar_t *buildStatus;
const wchar_t *primaryArtifactIdentifier;
const wchar_t *primaryArtifactLocation;
const wchar_t *primaryArtifactType;
int requestedOn;
int k;
int count_k;
const wchar_t *name;
const wchar_t *value;
const wchar_t *mountOptions;
const wchar_t *mountPoint;
int durationInSeconds;
int endTime;
const wchar_t *phaseStatus;
const wchar_t *phaseType;
int startTime;
const wchar_t *message;
const wchar_t *statusCode;
const wchar_t *artifactIdentifier;
const wchar_t *bucketOwnerAccess;
int encryptionDisabled;
const wchar_t *md5sum;
int overrideArtifactName;
const wchar_t *sha256sum;
const wchar_t *authResource;
const wchar_t *authType;
const wchar_t *buildspec;
const wchar_t *buildStatusConfigContext;
const wchar_t *buildStatusConfigTargetUrl;
int gitCloneDepth;
int gitSubmodulesConfigFetchSubmodules;
int insecureSsl;
int reportBuildStatus;
const wchar_t *sourceIdentifier;
const wchar_t *sourceVersion;
const wchar_t *Arn;
const wchar_t *ArtifactIdentifier;
const wchar_t *BucketOwnerAccess;
int EncryptionDisabled;
const wchar_t *Location;
const wchar_t *Md5sum;
int OverrideArtifactName;
const wchar_t *Sha256sum;
const wchar_t *BatchReportMode;
int CombineArtifacts;
int MaximumBuildsAllowed;
const wchar_t *ServiceRole;
int TimeoutInMins;
int BuildBatchNumber;
const wchar_t *BuildBatchStatus;
int BuildTimeoutInMinutes;
const wchar_t *CacheLocation;
const wchar_t *v_Type;
int Complete;
const wchar_t *CurrentPhase;
int DebugSessionEnabled;
const wchar_t *EncryptionKey;
int EndTime;
const wchar_t *Certificate;
const wchar_t *ComputeType;
const wchar_t *Image;
const wchar_t *ImagePullCredentialsType;
int PrivilegedMode;
const wchar_t *Credential;
const wchar_t *CredentialProvider;
const wchar_t *EnvironmentType;
const wchar_t *Id;
const wchar_t *Initiator;
const wchar_t *GroupName;
const wchar_t *Status;
const wchar_t *StreamName;
const wchar_t *S3LogsBucketOwnerAccess;
int S3LogsEncryptionDisabled;
const wchar_t *S3LogsLocation;
const wchar_t *S3LogsStatus;
const wchar_t *ProjectName;
int QueuedTimeoutInMinutes;
const wchar_t *ResolvedSourceVersion;
const wchar_t *buildBatchServiceRole;
const wchar_t *Resource;
const wchar_t *AuthType;
const wchar_t *Buildspec;
const wchar_t *Context;
const wchar_t *TargetUrl;
int GitCloneDepth;
int FetchSubmodules;
int InsecureSsl;
const wchar_t *SourceLocation;
int ReportBuildStatus;
const wchar_t *SourceIdentifier;
const wchar_t *SourceType;
const wchar_t *SourceVersion;
int StartTime;
const wchar_t *VpcId;
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"codebuild");
// SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
CkRestW_SetAuthAws(rest,authAws);
// URL: https://codebuild.us-west-2.amazonaws.com/
// Use the same region as specified above.
success = CkRestW_Connect(rest,L"codebuild.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;
}
// The following code creates the JSON request body.
// The JSON created by this code is shown below.
// Use this online tool to generate code from sample JSON:
// Generate Code to Create JSON
json = CkJsonObjectW_Create();
CkJsonObjectW_UpdateString(json,L"id",L"string");
CkJsonObjectW_UpdateString(json,L"idempotencyToken",L"string");
CkJsonObjectW_UpdateString(json,L"retryType",L"string");
// The JSON request body created by the above code:
// {
// "id": "string",
// "idempotencyToken": "string",
// "retryType": "string"
// }
CkRestW_AddHeader(rest,L"Content-Type",L"application/x-amz-json-1.1");
CkRestW_AddHeader(rest,L"X-Amz-Target",L"CodeBuild_20161006.RetryBuildBatch");
sbRequestBody = CkStringBuilderW_Create();
CkJsonObjectW_EmitSb(json,sbRequestBody);
sbResponseBody = CkStringBuilderW_Create();
success = CkRestW_FullRequestSb(rest,L"POST",L"/",sbRequestBody,sbResponseBody);
if (success != TRUE) {
wprintf(L"%s\n",CkRestW_lastErrorText(rest));
CkRestW_Dispose(rest);
CkAuthAwsW_Dispose(authAws);
CkJsonObjectW_Dispose(json);
CkStringBuilderW_Dispose(sbRequestBody);
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);
CkJsonObjectW_Dispose(json);
CkStringBuilderW_Dispose(sbRequestBody);
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.
Arn = CkJsonObjectW_stringOf(jResp,L"buildBatch.arn");
ArtifactIdentifier = CkJsonObjectW_stringOf(jResp,L"buildBatch.artifacts.artifactIdentifier");
BucketOwnerAccess = CkJsonObjectW_stringOf(jResp,L"buildBatch.artifacts.bucketOwnerAccess");
EncryptionDisabled = CkJsonObjectW_IntOf(jResp,L"buildBatch.artifacts.encryptionDisabled");
Location = CkJsonObjectW_stringOf(jResp,L"buildBatch.artifacts.location");
Md5sum = CkJsonObjectW_stringOf(jResp,L"buildBatch.artifacts.md5sum");
OverrideArtifactName = CkJsonObjectW_IntOf(jResp,L"buildBatch.artifacts.overrideArtifactName");
Sha256sum = CkJsonObjectW_stringOf(jResp,L"buildBatch.artifacts.sha256sum");
BatchReportMode = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildBatchConfig.batchReportMode");
CombineArtifacts = CkJsonObjectW_IntOf(jResp,L"buildBatch.buildBatchConfig.combineArtifacts");
MaximumBuildsAllowed = CkJsonObjectW_IntOf(jResp,L"buildBatch.buildBatchConfig.restrictions.maximumBuildsAllowed");
ServiceRole = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildBatchConfig.serviceRole");
TimeoutInMins = CkJsonObjectW_IntOf(jResp,L"buildBatch.buildBatchConfig.timeoutInMins");
BuildBatchNumber = CkJsonObjectW_IntOf(jResp,L"buildBatch.buildBatchNumber");
BuildBatchStatus = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildBatchStatus");
BuildTimeoutInMinutes = CkJsonObjectW_IntOf(jResp,L"buildBatch.buildTimeoutInMinutes");
CacheLocation = CkJsonObjectW_stringOf(jResp,L"buildBatch.cache.location");
v_Type = CkJsonObjectW_stringOf(jResp,L"buildBatch.cache.type");
Complete = CkJsonObjectW_IntOf(jResp,L"buildBatch.complete");
CurrentPhase = CkJsonObjectW_stringOf(jResp,L"buildBatch.currentPhase");
DebugSessionEnabled = CkJsonObjectW_IntOf(jResp,L"buildBatch.debugSessionEnabled");
EncryptionKey = CkJsonObjectW_stringOf(jResp,L"buildBatch.encryptionKey");
EndTime = CkJsonObjectW_IntOf(jResp,L"buildBatch.endTime");
Certificate = CkJsonObjectW_stringOf(jResp,L"buildBatch.environment.certificate");
ComputeType = CkJsonObjectW_stringOf(jResp,L"buildBatch.environment.computeType");
Image = CkJsonObjectW_stringOf(jResp,L"buildBatch.environment.image");
ImagePullCredentialsType = CkJsonObjectW_stringOf(jResp,L"buildBatch.environment.imagePullCredentialsType");
PrivilegedMode = CkJsonObjectW_IntOf(jResp,L"buildBatch.environment.privilegedMode");
Credential = CkJsonObjectW_stringOf(jResp,L"buildBatch.environment.registryCredential.credential");
CredentialProvider = CkJsonObjectW_stringOf(jResp,L"buildBatch.environment.registryCredential.credentialProvider");
EnvironmentType = CkJsonObjectW_stringOf(jResp,L"buildBatch.environment.type");
Id = CkJsonObjectW_stringOf(jResp,L"buildBatch.id");
Initiator = CkJsonObjectW_stringOf(jResp,L"buildBatch.initiator");
GroupName = CkJsonObjectW_stringOf(jResp,L"buildBatch.logConfig.cloudWatchLogs.groupName");
Status = CkJsonObjectW_stringOf(jResp,L"buildBatch.logConfig.cloudWatchLogs.status");
StreamName = CkJsonObjectW_stringOf(jResp,L"buildBatch.logConfig.cloudWatchLogs.streamName");
S3LogsBucketOwnerAccess = CkJsonObjectW_stringOf(jResp,L"buildBatch.logConfig.s3Logs.bucketOwnerAccess");
S3LogsEncryptionDisabled = CkJsonObjectW_IntOf(jResp,L"buildBatch.logConfig.s3Logs.encryptionDisabled");
S3LogsLocation = CkJsonObjectW_stringOf(jResp,L"buildBatch.logConfig.s3Logs.location");
S3LogsStatus = CkJsonObjectW_stringOf(jResp,L"buildBatch.logConfig.s3Logs.status");
ProjectName = CkJsonObjectW_stringOf(jResp,L"buildBatch.projectName");
QueuedTimeoutInMinutes = CkJsonObjectW_IntOf(jResp,L"buildBatch.queuedTimeoutInMinutes");
ResolvedSourceVersion = CkJsonObjectW_stringOf(jResp,L"buildBatch.resolvedSourceVersion");
buildBatchServiceRole = CkJsonObjectW_stringOf(jResp,L"buildBatch.serviceRole");
Resource = CkJsonObjectW_stringOf(jResp,L"buildBatch.source.auth.resource");
AuthType = CkJsonObjectW_stringOf(jResp,L"buildBatch.source.auth.type");
Buildspec = CkJsonObjectW_stringOf(jResp,L"buildBatch.source.buildspec");
Context = CkJsonObjectW_stringOf(jResp,L"buildBatch.source.buildStatusConfig.context");
TargetUrl = CkJsonObjectW_stringOf(jResp,L"buildBatch.source.buildStatusConfig.targetUrl");
GitCloneDepth = CkJsonObjectW_IntOf(jResp,L"buildBatch.source.gitCloneDepth");
FetchSubmodules = CkJsonObjectW_IntOf(jResp,L"buildBatch.source.gitSubmodulesConfig.fetchSubmodules");
InsecureSsl = CkJsonObjectW_IntOf(jResp,L"buildBatch.source.insecureSsl");
SourceLocation = CkJsonObjectW_stringOf(jResp,L"buildBatch.source.location");
ReportBuildStatus = CkJsonObjectW_IntOf(jResp,L"buildBatch.source.reportBuildStatus");
SourceIdentifier = CkJsonObjectW_stringOf(jResp,L"buildBatch.source.sourceIdentifier");
SourceType = CkJsonObjectW_stringOf(jResp,L"buildBatch.source.type");
SourceVersion = CkJsonObjectW_stringOf(jResp,L"buildBatch.sourceVersion");
StartTime = CkJsonObjectW_IntOf(jResp,L"buildBatch.startTime");
VpcId = CkJsonObjectW_stringOf(jResp,L"buildBatch.vpcConfig.vpcId");
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"buildBatch.buildBatchConfig.restrictions.computeTypesAllowed");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
strVal = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildBatchConfig.restrictions.computeTypesAllowed[i]");
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"buildBatch.buildGroups");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
currentBuildSummaryArn = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].currentBuildSummary.arn");
BuildStatus = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].currentBuildSummary.buildStatus");
Identifier = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].currentBuildSummary.primaryArtifact.identifier");
PrimaryArtifactLocation = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].currentBuildSummary.primaryArtifact.location");
PrimaryArtifactType = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].currentBuildSummary.primaryArtifact.type");
RequestedOn = CkJsonObjectW_IntOf(jResp,L"buildBatch.buildGroups[i].currentBuildSummary.requestedOn");
identifier = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].identifier");
ignoreFailure = CkJsonObjectW_IntOf(jResp,L"buildBatch.buildGroups[i].ignoreFailure");
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"buildBatch.buildGroups[i].currentBuildSummary.secondaryArtifacts");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
identifier = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].currentBuildSummary.secondaryArtifacts[j].identifier");
location = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].currentBuildSummary.secondaryArtifacts[j].location");
v_type = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].currentBuildSummary.secondaryArtifacts[j].type");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"buildBatch.buildGroups[i].dependsOn");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
strVal = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].dependsOn[j]");
j = j + 1;
}
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"buildBatch.buildGroups[i].priorBuildSummaryList");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
arn = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].priorBuildSummaryList[j].arn");
buildStatus = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].priorBuildSummaryList[j].buildStatus");
primaryArtifactIdentifier = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].priorBuildSummaryList[j].primaryArtifact.identifier");
primaryArtifactLocation = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].priorBuildSummaryList[j].primaryArtifact.location");
primaryArtifactType = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].priorBuildSummaryList[j].primaryArtifact.type");
requestedOn = CkJsonObjectW_IntOf(jResp,L"buildBatch.buildGroups[i].priorBuildSummaryList[j].requestedOn");
k = 0;
count_k = CkJsonObjectW_SizeOfArray(jResp,L"buildBatch.buildGroups[i].priorBuildSummaryList[j].secondaryArtifacts");
while (k < count_k) {
CkJsonObjectW_putK(jResp,k);
identifier = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].priorBuildSummaryList[j].secondaryArtifacts[k].identifier");
location = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].priorBuildSummaryList[j].secondaryArtifacts[k].location");
v_type = CkJsonObjectW_stringOf(jResp,L"buildBatch.buildGroups[i].priorBuildSummaryList[j].secondaryArtifacts[k].type");
k = k + 1;
}
j = j + 1;
}
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"buildBatch.cache.modes");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
strVal = CkJsonObjectW_stringOf(jResp,L"buildBatch.cache.modes[i]");
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"buildBatch.environment.environmentVariables");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
name = CkJsonObjectW_stringOf(jResp,L"buildBatch.environment.environmentVariables[i].name");
v_type = CkJsonObjectW_stringOf(jResp,L"buildBatch.environment.environmentVariables[i].type");
value = CkJsonObjectW_stringOf(jResp,L"buildBatch.environment.environmentVariables[i].value");
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"buildBatch.fileSystemLocations");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
identifier = CkJsonObjectW_stringOf(jResp,L"buildBatch.fileSystemLocations[i].identifier");
location = CkJsonObjectW_stringOf(jResp,L"buildBatch.fileSystemLocations[i].location");
mountOptions = CkJsonObjectW_stringOf(jResp,L"buildBatch.fileSystemLocations[i].mountOptions");
mountPoint = CkJsonObjectW_stringOf(jResp,L"buildBatch.fileSystemLocations[i].mountPoint");
v_type = CkJsonObjectW_stringOf(jResp,L"buildBatch.fileSystemLocations[i].type");
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"buildBatch.phases");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
durationInSeconds = CkJsonObjectW_IntOf(jResp,L"buildBatch.phases[i].durationInSeconds");
endTime = CkJsonObjectW_IntOf(jResp,L"buildBatch.phases[i].endTime");
phaseStatus = CkJsonObjectW_stringOf(jResp,L"buildBatch.phases[i].phaseStatus");
phaseType = CkJsonObjectW_stringOf(jResp,L"buildBatch.phases[i].phaseType");
startTime = CkJsonObjectW_IntOf(jResp,L"buildBatch.phases[i].startTime");
j = 0;
count_j = CkJsonObjectW_SizeOfArray(jResp,L"buildBatch.phases[i].contexts");
while (j < count_j) {
CkJsonObjectW_putJ(jResp,j);
message = CkJsonObjectW_stringOf(jResp,L"buildBatch.phases[i].contexts[j].message");
statusCode = CkJsonObjectW_stringOf(jResp,L"buildBatch.phases[i].contexts[j].statusCode");
j = j + 1;
}
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"buildBatch.secondaryArtifacts");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
artifactIdentifier = CkJsonObjectW_stringOf(jResp,L"buildBatch.secondaryArtifacts[i].artifactIdentifier");
bucketOwnerAccess = CkJsonObjectW_stringOf(jResp,L"buildBatch.secondaryArtifacts[i].bucketOwnerAccess");
encryptionDisabled = CkJsonObjectW_IntOf(jResp,L"buildBatch.secondaryArtifacts[i].encryptionDisabled");
location = CkJsonObjectW_stringOf(jResp,L"buildBatch.secondaryArtifacts[i].location");
md5sum = CkJsonObjectW_stringOf(jResp,L"buildBatch.secondaryArtifacts[i].md5sum");
overrideArtifactName = CkJsonObjectW_IntOf(jResp,L"buildBatch.secondaryArtifacts[i].overrideArtifactName");
sha256sum = CkJsonObjectW_stringOf(jResp,L"buildBatch.secondaryArtifacts[i].sha256sum");
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"buildBatch.secondarySources");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
authResource = CkJsonObjectW_stringOf(jResp,L"buildBatch.secondarySources[i].auth.resource");
authType = CkJsonObjectW_stringOf(jResp,L"buildBatch.secondarySources[i].auth.type");
buildspec = CkJsonObjectW_stringOf(jResp,L"buildBatch.secondarySources[i].buildspec");
buildStatusConfigContext = CkJsonObjectW_stringOf(jResp,L"buildBatch.secondarySources[i].buildStatusConfig.context");
buildStatusConfigTargetUrl = CkJsonObjectW_stringOf(jResp,L"buildBatch.secondarySources[i].buildStatusConfig.targetUrl");
gitCloneDepth = CkJsonObjectW_IntOf(jResp,L"buildBatch.secondarySources[i].gitCloneDepth");
gitSubmodulesConfigFetchSubmodules = CkJsonObjectW_IntOf(jResp,L"buildBatch.secondarySources[i].gitSubmodulesConfig.fetchSubmodules");
insecureSsl = CkJsonObjectW_IntOf(jResp,L"buildBatch.secondarySources[i].insecureSsl");
location = CkJsonObjectW_stringOf(jResp,L"buildBatch.secondarySources[i].location");
reportBuildStatus = CkJsonObjectW_IntOf(jResp,L"buildBatch.secondarySources[i].reportBuildStatus");
sourceIdentifier = CkJsonObjectW_stringOf(jResp,L"buildBatch.secondarySources[i].sourceIdentifier");
v_type = CkJsonObjectW_stringOf(jResp,L"buildBatch.secondarySources[i].type");
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"buildBatch.secondarySourceVersions");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
sourceIdentifier = CkJsonObjectW_stringOf(jResp,L"buildBatch.secondarySourceVersions[i].sourceIdentifier");
sourceVersion = CkJsonObjectW_stringOf(jResp,L"buildBatch.secondarySourceVersions[i].sourceVersion");
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"buildBatch.vpcConfig.securityGroupIds");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
strVal = CkJsonObjectW_stringOf(jResp,L"buildBatch.vpcConfig.securityGroupIds[i]");
i = i + 1;
}
i = 0;
count_i = CkJsonObjectW_SizeOfArray(jResp,L"buildBatch.vpcConfig.subnets");
while (i < count_i) {
CkJsonObjectW_putI(jResp,i);
strVal = CkJsonObjectW_stringOf(jResp,L"buildBatch.vpcConfig.subnets[i]");
i = i + 1;
}
// A sample JSON response body parsed by the above code:
// {
// "buildBatch": {
// "arn": "string",
// "artifacts": {
// "artifactIdentifier": "string",
// "bucketOwnerAccess": "string",
// "encryptionDisabled": boolean,
// "location": "string",
// "md5sum": "string",
// "overrideArtifactName": boolean,
// "sha256sum": "string"
// },
// "buildBatchConfig": {
// "batchReportMode": "string",
// "combineArtifacts": boolean,
// "restrictions": {
// "computeTypesAllowed": [
// "string"
// ],
// "maximumBuildsAllowed": number
// },
// "serviceRole": "string",
// "timeoutInMins": number
// },
// "buildBatchNumber": number,
// "buildBatchStatus": "string",
// "buildGroups": [
// {
// "currentBuildSummary": {
// "arn": "string",
// "buildStatus": "string",
// "primaryArtifact": {
// "identifier": "string",
// "location": "string",
// "type": "string"
// },
// "requestedOn": number,
// "secondaryArtifacts": [
// {
// "identifier": "string",
// "location": "string",
// "type": "string"
// }
// ]
// },
// "dependsOn": [
// "string"
// ],
// "identifier": "string",
// "ignoreFailure": boolean,
// "priorBuildSummaryList": [
// {
// "arn": "string",
// "buildStatus": "string",
// "primaryArtifact": {
// "identifier": "string",
// "location": "string",
// "type": "string"
// },
// "requestedOn": number,
// "secondaryArtifacts": [
// {
// "identifier": "string",
// "location": "string",
// "type": "string"
// }
// ]
// }
// ]
// }
// ],
// "buildTimeoutInMinutes": number,
// "cache": {
// "location": "string",
// "modes": [
// "string"
// ],
// "type": "string"
// },
// "complete": boolean,
// "currentPhase": "string",
// "debugSessionEnabled": boolean,
// "encryptionKey": "string",
// "endTime": number,
// "environment": {
// "certificate": "string",
// "computeType": "string",
// "environmentVariables": [
// {
// "name": "string",
// "type": "string",
// "value": "string"
// }
// ],
// "image": "string",
// "imagePullCredentialsType": "string",
// "privilegedMode": boolean,
// "registryCredential": {
// "credential": "string",
// "credentialProvider": "string"
// },
// "type": "string"
// },
// "fileSystemLocations": [
// {
// "identifier": "string",
// "location": "string",
// "mountOptions": "string",
// "mountPoint": "string",
// "type": "string"
// }
// ],
// "id": "string",
// "initiator": "string",
// "logConfig": {
// "cloudWatchLogs": {
// "groupName": "string",
// "status": "string",
// "streamName": "string"
// },
// "s3Logs": {
// "bucketOwnerAccess": "string",
// "encryptionDisabled": boolean,
// "location": "string",
// "status": "string"
// }
// },
// "phases": [
// {
// "contexts": [
// {
// "message": "string",
// "statusCode": "string"
// }
// ],
// "durationInSeconds": number,
// "endTime": number,
// "phaseStatus": "string",
// "phaseType": "string",
// "startTime": number
// }
// ],
// "projectName": "string",
// "queuedTimeoutInMinutes": number,
// "resolvedSourceVersion": "string",
// "secondaryArtifacts": [
// {
// "artifactIdentifier": "string",
// "bucketOwnerAccess": "string",
// "encryptionDisabled": boolean,
// "location": "string",
// "md5sum": "string",
// "overrideArtifactName": boolean,
// "sha256sum": "string"
// }
// ],
// "secondarySources": [
// {
// "auth": {
// "resource": "string",
// "type": "string"
// },
// "buildspec": "string",
// "buildStatusConfig": {
// "context": "string",
// "targetUrl": "string"
// },
// "gitCloneDepth": number,
// "gitSubmodulesConfig": {
// "fetchSubmodules": boolean
// },
// "insecureSsl": boolean,
// "location": "string",
// "reportBuildStatus": boolean,
// "sourceIdentifier": "string",
// "type": "string"
// }
// ],
// "secondarySourceVersions": [
// {
// "sourceIdentifier": "string",
// "sourceVersion": "string"
// }
// ],
// "serviceRole": "string",
// "source": {
// "auth": {
// "resource": "string",
// "type": "string"
// },
// "buildspec": "string",
// "buildStatusConfig": {
// "context": "string",
// "targetUrl": "string"
// },
// "gitCloneDepth": number,
// "gitSubmodulesConfig": {
// "fetchSubmodules": boolean
// },
// "insecureSsl": boolean,
// "location": "string",
// "reportBuildStatus": boolean,
// "sourceIdentifier": "string",
// "type": "string"
// },
// "sourceVersion": "string",
// "startTime": number,
// "vpcConfig": {
// "securityGroupIds": [
// "string"
// ],
// "subnets": [
// "string"
// ],
// "vpcId": "string"
// }
// }
// }
CkRestW_Dispose(rest);
CkAuthAwsW_Dispose(authAws);
CkJsonObjectW_Dispose(json);
CkStringBuilderW_Dispose(sbRequestBody);
CkStringBuilderW_Dispose(sbResponseBody);
CkJsonObjectW_Dispose(jResp);
}