StartBuildBatch Xojo Example
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Dim rest As New Chilkat.Rest
Dim success As Boolean
Dim authAws As New Chilkat.AuthAws
authAws.AccessKey = "AWS_ACCESS_KEY"
authAws.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.)
authAws.Region = "us-west-2"
authAws.ServiceName = "codebuild"
// SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
success = rest.SetAuthAws(authAws)
// URL: https://codebuild.us-west-2.amazonaws.com/
// Use the same region as specified above.
success = rest.Connect("codebuild.us-west-2.amazonaws.com",443,True,True)
If (success <> True) Then
System.DebugLog("ConnectFailReason: " + Str(rest.ConnectFailReason))
System.DebugLog(rest.LastErrorText)
Return
End If
// 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
Dim json As New Chilkat.JsonObject
success = json.UpdateString("artifactsOverride.artifactIdentifier","string")
success = json.UpdateString("artifactsOverride.bucketOwnerAccess","string")
success = json.UpdateInt("artifactsOverride.encryptionDisabled",123)
success = json.UpdateString("artifactsOverride.location","string")
success = json.UpdateString("artifactsOverride.name","string")
success = json.UpdateString("artifactsOverride.namespaceType","string")
success = json.UpdateInt("artifactsOverride.overrideArtifactName",123)
success = json.UpdateString("artifactsOverride.packaging","string")
success = json.UpdateString("artifactsOverride.path","string")
success = json.UpdateString("artifactsOverride.type","string")
success = json.UpdateString("buildBatchConfigOverride.batchReportMode","string")
success = json.UpdateInt("buildBatchConfigOverride.combineArtifacts",123)
success = json.UpdateString("buildBatchConfigOverride.restrictions.computeTypesAllowed[0]","string")
success = json.UpdateInt("buildBatchConfigOverride.restrictions.maximumBuildsAllowed",123)
success = json.UpdateString("buildBatchConfigOverride.serviceRole","string")
success = json.UpdateInt("buildBatchConfigOverride.timeoutInMins",123)
success = json.UpdateString("buildspecOverride","string")
success = json.UpdateInt("buildTimeoutInMinutesOverride",123)
success = json.UpdateString("cacheOverride.location","string")
success = json.UpdateString("cacheOverride.modes[0]","string")
success = json.UpdateString("cacheOverride.type","string")
success = json.UpdateString("certificateOverride","string")
success = json.UpdateString("computeTypeOverride","string")
success = json.UpdateInt("debugSessionEnabled",123)
success = json.UpdateString("encryptionKeyOverride","string")
success = json.UpdateString("environmentTypeOverride","string")
success = json.UpdateString("environmentVariablesOverride[0].name","string")
success = json.UpdateString("environmentVariablesOverride[0].type","string")
success = json.UpdateString("environmentVariablesOverride[0].value","string")
success = json.UpdateInt("gitCloneDepthOverride",123)
success = json.UpdateInt("gitSubmodulesConfigOverride.fetchSubmodules",123)
success = json.UpdateString("idempotencyToken","string")
success = json.UpdateString("imageOverride","string")
success = json.UpdateString("imagePullCredentialsTypeOverride","string")
success = json.UpdateInt("insecureSslOverride",123)
success = json.UpdateString("logsConfigOverride.cloudWatchLogs.groupName","string")
success = json.UpdateString("logsConfigOverride.cloudWatchLogs.status","string")
success = json.UpdateString("logsConfigOverride.cloudWatchLogs.streamName","string")
success = json.UpdateString("logsConfigOverride.s3Logs.bucketOwnerAccess","string")
success = json.UpdateInt("logsConfigOverride.s3Logs.encryptionDisabled",123)
success = json.UpdateString("logsConfigOverride.s3Logs.location","string")
success = json.UpdateString("logsConfigOverride.s3Logs.status","string")
success = json.UpdateInt("privilegedModeOverride",123)
success = json.UpdateString("projectName","string")
success = json.UpdateInt("queuedTimeoutInMinutesOverride",123)
success = json.UpdateString("registryCredentialOverride.credential","string")
success = json.UpdateString("registryCredentialOverride.credentialProvider","string")
success = json.UpdateInt("reportBuildBatchStatusOverride",123)
success = json.UpdateString("secondaryArtifactsOverride[0].artifactIdentifier","string")
success = json.UpdateString("secondaryArtifactsOverride[0].bucketOwnerAccess","string")
success = json.UpdateInt("secondaryArtifactsOverride[0].encryptionDisabled",123)
success = json.UpdateString("secondaryArtifactsOverride[0].location","string")
success = json.UpdateString("secondaryArtifactsOverride[0].name","string")
success = json.UpdateString("secondaryArtifactsOverride[0].namespaceType","string")
success = json.UpdateInt("secondaryArtifactsOverride[0].overrideArtifactName",123)
success = json.UpdateString("secondaryArtifactsOverride[0].packaging","string")
success = json.UpdateString("secondaryArtifactsOverride[0].path","string")
success = json.UpdateString("secondaryArtifactsOverride[0].type","string")
success = json.UpdateString("secondarySourcesOverride[0].auth.resource","string")
success = json.UpdateString("secondarySourcesOverride[0].auth.type","string")
success = json.UpdateString("secondarySourcesOverride[0].buildspec","string")
success = json.UpdateString("secondarySourcesOverride[0].buildStatusConfig.context","string")
success = json.UpdateString("secondarySourcesOverride[0].buildStatusConfig.targetUrl","string")
success = json.UpdateInt("secondarySourcesOverride[0].gitCloneDepth",123)
success = json.UpdateInt("secondarySourcesOverride[0].gitSubmodulesConfig.fetchSubmodules",123)
success = json.UpdateInt("secondarySourcesOverride[0].insecureSsl",123)
success = json.UpdateString("secondarySourcesOverride[0].location","string")
success = json.UpdateInt("secondarySourcesOverride[0].reportBuildStatus",123)
success = json.UpdateString("secondarySourcesOverride[0].sourceIdentifier","string")
success = json.UpdateString("secondarySourcesOverride[0].type","string")
success = json.UpdateString("secondarySourcesVersionOverride[0].sourceIdentifier","string")
success = json.UpdateString("secondarySourcesVersionOverride[0].sourceVersion","string")
success = json.UpdateString("serviceRoleOverride","string")
success = json.UpdateString("sourceAuthOverride.resource","string")
success = json.UpdateString("sourceAuthOverride.type","string")
success = json.UpdateString("sourceLocationOverride","string")
success = json.UpdateString("sourceTypeOverride","string")
success = json.UpdateString("sourceVersion","string")
// The JSON request body created by the above code:
// {
// "artifactsOverride": {
// "artifactIdentifier": "string",
// "bucketOwnerAccess": "string",
// "encryptionDisabled": boolean,
// "location": "string",
// "name": "string",
// "namespaceType": "string",
// "overrideArtifactName": boolean,
// "packaging": "string",
// "path": "string",
// "type": "string"
// },
// "buildBatchConfigOverride": {
// "batchReportMode": "string",
// "combineArtifacts": boolean,
// "restrictions": {
// "computeTypesAllowed": [
// "string"
// ],
// "maximumBuildsAllowed": number
// },
// "serviceRole": "string",
// "timeoutInMins": number
// },
// "buildspecOverride": "string",
// "buildTimeoutInMinutesOverride": number,
// "cacheOverride": {
// "location": "string",
// "modes": [
// "string"
// ],
// "type": "string"
// },
// "certificateOverride": "string",
// "computeTypeOverride": "string",
// "debugSessionEnabled": boolean,
// "encryptionKeyOverride": "string",
// "environmentTypeOverride": "string",
// "environmentVariablesOverride": [
// {
// "name": "string",
// "type": "string",
// "value": "string"
// }
// ],
// "gitCloneDepthOverride": number,
// "gitSubmodulesConfigOverride": {
// "fetchSubmodules": boolean
// },
// "idempotencyToken": "string",
// "imageOverride": "string",
// "imagePullCredentialsTypeOverride": "string",
// "insecureSslOverride": boolean,
// "logsConfigOverride": {
// "cloudWatchLogs": {
// "groupName": "string",
// "status": "string",
// "streamName": "string"
// },
// "s3Logs": {
// "bucketOwnerAccess": "string",
// "encryptionDisabled": boolean,
// "location": "string",
// "status": "string"
// }
// },
// "privilegedModeOverride": boolean,
// "projectName": "string",
// "queuedTimeoutInMinutesOverride": number,
// "registryCredentialOverride": {
// "credential": "string",
// "credentialProvider": "string"
// },
// "reportBuildBatchStatusOverride": boolean,
// "secondaryArtifactsOverride": [
// {
// "artifactIdentifier": "string",
// "bucketOwnerAccess": "string",
// "encryptionDisabled": boolean,
// "location": "string",
// "name": "string",
// "namespaceType": "string",
// "overrideArtifactName": boolean,
// "packaging": "string",
// "path": "string",
// "type": "string"
// }
// ],
// "secondarySourcesOverride": [
// {
// "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"
// }
// ],
// "secondarySourcesVersionOverride": [
// {
// "sourceIdentifier": "string",
// "sourceVersion": "string"
// }
// ],
// "serviceRoleOverride": "string",
// "sourceAuthOverride": {
// "resource": "string",
// "type": "string"
// },
// "sourceLocationOverride": "string",
// "sourceTypeOverride": "string",
// "sourceVersion": "string"
// }
success = rest.AddHeader("Content-Type","application/x-amz-json-1.1")
success = rest.AddHeader("X-Amz-Target","CodeBuild_20161006.StartBuildBatch")
Dim sbRequestBody As New Chilkat.StringBuilder
success = json.EmitSb(sbRequestBody)
Dim sbResponseBody As New Chilkat.StringBuilder
success = rest.FullRequestSb("POST","/",sbRequestBody,sbResponseBody)
If (success <> True) Then
System.DebugLog(rest.LastErrorText)
Return
End If
Dim respStatusCode As Int32
respStatusCode = rest.ResponseStatusCode
System.DebugLog("response status code = " + Str(respStatusCode))
If (respStatusCode <> 200) Then
System.DebugLog("Response Header:")
System.DebugLog(rest.ResponseHeader)
System.DebugLog("Response Body:")
System.DebugLog(sbResponseBody.GetAsString())
Return
End If
Dim jResp As New Chilkat.JsonObject
success = jResp.LoadSb(sbResponseBody)
// The following code parses the JSON response.
// A sample JSON response is shown below the sample code.
// Use this online tool to generate parsing code from sample JSON:
// Generate Parsing Code from JSON
Dim strVal As String
Dim currentBuildSummaryArn As String
Dim BuildStatus As String
Dim Identifier As String
Dim PrimaryArtifactLocation As String
Dim PrimaryArtifactType As String
Dim RequestedOn As Int32
Dim identifier As String
Dim ignoreFailure As Int32
Dim j As Int32
Dim count_j As Int32
Dim location As String
Dim v_type As String
Dim arn As String
Dim buildStatus As String
Dim primaryArtifactIdentifier As String
Dim primaryArtifactLocation As String
Dim primaryArtifactType As String
Dim requestedOn As Int32
Dim k As Int32
Dim count_k As Int32
Dim name As String
Dim value As String
Dim mountOptions As String
Dim mountPoint As String
Dim durationInSeconds As Int32
Dim endTime As Int32
Dim phaseStatus As String
Dim phaseType As String
Dim startTime As Int32
Dim message As String
Dim statusCode As String
Dim artifactIdentifier As String
Dim bucketOwnerAccess As String
Dim encryptionDisabled As Int32
Dim md5sum As String
Dim overrideArtifactName As Int32
Dim sha256sum As String
Dim authResource As String
Dim authType As String
Dim buildspec As String
Dim buildStatusConfigContext As String
Dim buildStatusConfigTargetUrl As String
Dim gitCloneDepth As Int32
Dim gitSubmodulesConfigFetchSubmodules As Int32
Dim insecureSsl As Int32
Dim reportBuildStatus As Int32
Dim sourceIdentifier As String
Dim sourceVersion As String
Dim Arn As String
Arn = jResp.StringOf("buildBatch.arn")
Dim ArtifactIdentifier As String
ArtifactIdentifier = jResp.StringOf("buildBatch.artifacts.artifactIdentifier")
Dim BucketOwnerAccess As String
BucketOwnerAccess = jResp.StringOf("buildBatch.artifacts.bucketOwnerAccess")
Dim EncryptionDisabled As Int32
EncryptionDisabled = jResp.IntOf("buildBatch.artifacts.encryptionDisabled")
Dim Location As String
Location = jResp.StringOf("buildBatch.artifacts.location")
Dim Md5sum As String
Md5sum = jResp.StringOf("buildBatch.artifacts.md5sum")
Dim OverrideArtifactName As Int32
OverrideArtifactName = jResp.IntOf("buildBatch.artifacts.overrideArtifactName")
Dim Sha256sum As String
Sha256sum = jResp.StringOf("buildBatch.artifacts.sha256sum")
Dim BatchReportMode As String
BatchReportMode = jResp.StringOf("buildBatch.buildBatchConfig.batchReportMode")
Dim CombineArtifacts As Int32
CombineArtifacts = jResp.IntOf("buildBatch.buildBatchConfig.combineArtifacts")
Dim MaximumBuildsAllowed As Int32
MaximumBuildsAllowed = jResp.IntOf("buildBatch.buildBatchConfig.restrictions.maximumBuildsAllowed")
Dim ServiceRole As String
ServiceRole = jResp.StringOf("buildBatch.buildBatchConfig.serviceRole")
Dim TimeoutInMins As Int32
TimeoutInMins = jResp.IntOf("buildBatch.buildBatchConfig.timeoutInMins")
Dim BuildBatchNumber As Int32
BuildBatchNumber = jResp.IntOf("buildBatch.buildBatchNumber")
Dim BuildBatchStatus As String
BuildBatchStatus = jResp.StringOf("buildBatch.buildBatchStatus")
Dim BuildTimeoutInMinutes As Int32
BuildTimeoutInMinutes = jResp.IntOf("buildBatch.buildTimeoutInMinutes")
Dim CacheLocation As String
CacheLocation = jResp.StringOf("buildBatch.cache.location")
Dim v_Type As String
v_Type = jResp.StringOf("buildBatch.cache.type")
Dim Complete As Int32
Complete = jResp.IntOf("buildBatch.complete")
Dim CurrentPhase As String
CurrentPhase = jResp.StringOf("buildBatch.currentPhase")
Dim DebugSessionEnabled As Int32
DebugSessionEnabled = jResp.IntOf("buildBatch.debugSessionEnabled")
Dim EncryptionKey As String
EncryptionKey = jResp.StringOf("buildBatch.encryptionKey")
Dim EndTime As Int32
EndTime = jResp.IntOf("buildBatch.endTime")
Dim Certificate As String
Certificate = jResp.StringOf("buildBatch.environment.certificate")
Dim ComputeType As String
ComputeType = jResp.StringOf("buildBatch.environment.computeType")
Dim Image As String
Image = jResp.StringOf("buildBatch.environment.image")
Dim ImagePullCredentialsType As String
ImagePullCredentialsType = jResp.StringOf("buildBatch.environment.imagePullCredentialsType")
Dim PrivilegedMode As Int32
PrivilegedMode = jResp.IntOf("buildBatch.environment.privilegedMode")
Dim Credential As String
Credential = jResp.StringOf("buildBatch.environment.registryCredential.credential")
Dim CredentialProvider As String
CredentialProvider = jResp.StringOf("buildBatch.environment.registryCredential.credentialProvider")
Dim EnvironmentType As String
EnvironmentType = jResp.StringOf("buildBatch.environment.type")
Dim Id As String
Id = jResp.StringOf("buildBatch.id")
Dim Initiator As String
Initiator = jResp.StringOf("buildBatch.initiator")
Dim GroupName As String
GroupName = jResp.StringOf("buildBatch.logConfig.cloudWatchLogs.groupName")
Dim Status As String
Status = jResp.StringOf("buildBatch.logConfig.cloudWatchLogs.status")
Dim StreamName As String
StreamName = jResp.StringOf("buildBatch.logConfig.cloudWatchLogs.streamName")
Dim S3LogsBucketOwnerAccess As String
S3LogsBucketOwnerAccess = jResp.StringOf("buildBatch.logConfig.s3Logs.bucketOwnerAccess")
Dim S3LogsEncryptionDisabled As Int32
S3LogsEncryptionDisabled = jResp.IntOf("buildBatch.logConfig.s3Logs.encryptionDisabled")
Dim S3LogsLocation As String
S3LogsLocation = jResp.StringOf("buildBatch.logConfig.s3Logs.location")
Dim S3LogsStatus As String
S3LogsStatus = jResp.StringOf("buildBatch.logConfig.s3Logs.status")
Dim ProjectName As String
ProjectName = jResp.StringOf("buildBatch.projectName")
Dim QueuedTimeoutInMinutes As Int32
QueuedTimeoutInMinutes = jResp.IntOf("buildBatch.queuedTimeoutInMinutes")
Dim ResolvedSourceVersion As String
ResolvedSourceVersion = jResp.StringOf("buildBatch.resolvedSourceVersion")
Dim buildBatchServiceRole As String
buildBatchServiceRole = jResp.StringOf("buildBatch.serviceRole")
Dim Resource As String
Resource = jResp.StringOf("buildBatch.source.auth.resource")
Dim AuthType As String
AuthType = jResp.StringOf("buildBatch.source.auth.type")
Dim Buildspec As String
Buildspec = jResp.StringOf("buildBatch.source.buildspec")
Dim Context As String
Context = jResp.StringOf("buildBatch.source.buildStatusConfig.context")
Dim TargetUrl As String
TargetUrl = jResp.StringOf("buildBatch.source.buildStatusConfig.targetUrl")
Dim GitCloneDepth As Int32
GitCloneDepth = jResp.IntOf("buildBatch.source.gitCloneDepth")
Dim FetchSubmodules As Int32
FetchSubmodules = jResp.IntOf("buildBatch.source.gitSubmodulesConfig.fetchSubmodules")
Dim InsecureSsl As Int32
InsecureSsl = jResp.IntOf("buildBatch.source.insecureSsl")
Dim SourceLocation As String
SourceLocation = jResp.StringOf("buildBatch.source.location")
Dim ReportBuildStatus As Int32
ReportBuildStatus = jResp.IntOf("buildBatch.source.reportBuildStatus")
Dim SourceIdentifier As String
SourceIdentifier = jResp.StringOf("buildBatch.source.sourceIdentifier")
Dim SourceType As String
SourceType = jResp.StringOf("buildBatch.source.type")
Dim SourceVersion As String
SourceVersion = jResp.StringOf("buildBatch.sourceVersion")
Dim StartTime As Int32
StartTime = jResp.IntOf("buildBatch.startTime")
Dim VpcId As String
VpcId = jResp.StringOf("buildBatch.vpcConfig.vpcId")
Dim i As Int32
i = 0
Dim count_i As Int32
count_i = jResp.SizeOfArray("buildBatch.buildBatchConfig.restrictions.computeTypesAllowed")
While i < count_i
jResp.I = i
strVal = jResp.StringOf("buildBatch.buildBatchConfig.restrictions.computeTypesAllowed[i]")
i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("buildBatch.buildGroups")
While i < count_i
jResp.I = i
currentBuildSummaryArn = jResp.StringOf("buildBatch.buildGroups[i].currentBuildSummary.arn")
BuildStatus = jResp.StringOf("buildBatch.buildGroups[i].currentBuildSummary.buildStatus")
Identifier = jResp.StringOf("buildBatch.buildGroups[i].currentBuildSummary.primaryArtifact.identifier")
PrimaryArtifactLocation = jResp.StringOf("buildBatch.buildGroups[i].currentBuildSummary.primaryArtifact.location")
PrimaryArtifactType = jResp.StringOf("buildBatch.buildGroups[i].currentBuildSummary.primaryArtifact.type")
RequestedOn = jResp.IntOf("buildBatch.buildGroups[i].currentBuildSummary.requestedOn")
identifier = jResp.StringOf("buildBatch.buildGroups[i].identifier")
ignoreFailure = jResp.IntOf("buildBatch.buildGroups[i].ignoreFailure")
j = 0
count_j = jResp.SizeOfArray("buildBatch.buildGroups[i].currentBuildSummary.secondaryArtifacts")
While j < count_j
jResp.J = j
identifier = jResp.StringOf("buildBatch.buildGroups[i].currentBuildSummary.secondaryArtifacts[j].identifier")
location = jResp.StringOf("buildBatch.buildGroups[i].currentBuildSummary.secondaryArtifacts[j].location")
v_type = jResp.StringOf("buildBatch.buildGroups[i].currentBuildSummary.secondaryArtifacts[j].type")
j = j + 1
Wend
j = 0
count_j = jResp.SizeOfArray("buildBatch.buildGroups[i].dependsOn")
While j < count_j
jResp.J = j
strVal = jResp.StringOf("buildBatch.buildGroups[i].dependsOn[j]")
j = j + 1
Wend
j = 0
count_j = jResp.SizeOfArray("buildBatch.buildGroups[i].priorBuildSummaryList")
While j < count_j
jResp.J = j
arn = jResp.StringOf("buildBatch.buildGroups[i].priorBuildSummaryList[j].arn")
buildStatus = jResp.StringOf("buildBatch.buildGroups[i].priorBuildSummaryList[j].buildStatus")
primaryArtifactIdentifier = jResp.StringOf("buildBatch.buildGroups[i].priorBuildSummaryList[j].primaryArtifact.identifier")
primaryArtifactLocation = jResp.StringOf("buildBatch.buildGroups[i].priorBuildSummaryList[j].primaryArtifact.location")
primaryArtifactType = jResp.StringOf("buildBatch.buildGroups[i].priorBuildSummaryList[j].primaryArtifact.type")
requestedOn = jResp.IntOf("buildBatch.buildGroups[i].priorBuildSummaryList[j].requestedOn")
k = 0
count_k = jResp.SizeOfArray("buildBatch.buildGroups[i].priorBuildSummaryList[j].secondaryArtifacts")
While k < count_k
jResp.K = k
identifier = jResp.StringOf("buildBatch.buildGroups[i].priorBuildSummaryList[j].secondaryArtifacts[k].identifier")
location = jResp.StringOf("buildBatch.buildGroups[i].priorBuildSummaryList[j].secondaryArtifacts[k].location")
v_type = jResp.StringOf("buildBatch.buildGroups[i].priorBuildSummaryList[j].secondaryArtifacts[k].type")
k = k + 1
Wend
j = j + 1
Wend
i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("buildBatch.cache.modes")
While i < count_i
jResp.I = i
strVal = jResp.StringOf("buildBatch.cache.modes[i]")
i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("buildBatch.environment.environmentVariables")
While i < count_i
jResp.I = i
name = jResp.StringOf("buildBatch.environment.environmentVariables[i].name")
v_type = jResp.StringOf("buildBatch.environment.environmentVariables[i].type")
value = jResp.StringOf("buildBatch.environment.environmentVariables[i].value")
i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("buildBatch.fileSystemLocations")
While i < count_i
jResp.I = i
identifier = jResp.StringOf("buildBatch.fileSystemLocations[i].identifier")
location = jResp.StringOf("buildBatch.fileSystemLocations[i].location")
mountOptions = jResp.StringOf("buildBatch.fileSystemLocations[i].mountOptions")
mountPoint = jResp.StringOf("buildBatch.fileSystemLocations[i].mountPoint")
v_type = jResp.StringOf("buildBatch.fileSystemLocations[i].type")
i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("buildBatch.phases")
While i < count_i
jResp.I = i
durationInSeconds = jResp.IntOf("buildBatch.phases[i].durationInSeconds")
endTime = jResp.IntOf("buildBatch.phases[i].endTime")
phaseStatus = jResp.StringOf("buildBatch.phases[i].phaseStatus")
phaseType = jResp.StringOf("buildBatch.phases[i].phaseType")
startTime = jResp.IntOf("buildBatch.phases[i].startTime")
j = 0
count_j = jResp.SizeOfArray("buildBatch.phases[i].contexts")
While j < count_j
jResp.J = j
message = jResp.StringOf("buildBatch.phases[i].contexts[j].message")
statusCode = jResp.StringOf("buildBatch.phases[i].contexts[j].statusCode")
j = j + 1
Wend
i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("buildBatch.secondaryArtifacts")
While i < count_i
jResp.I = i
artifactIdentifier = jResp.StringOf("buildBatch.secondaryArtifacts[i].artifactIdentifier")
bucketOwnerAccess = jResp.StringOf("buildBatch.secondaryArtifacts[i].bucketOwnerAccess")
encryptionDisabled = jResp.IntOf("buildBatch.secondaryArtifacts[i].encryptionDisabled")
location = jResp.StringOf("buildBatch.secondaryArtifacts[i].location")
md5sum = jResp.StringOf("buildBatch.secondaryArtifacts[i].md5sum")
overrideArtifactName = jResp.IntOf("buildBatch.secondaryArtifacts[i].overrideArtifactName")
sha256sum = jResp.StringOf("buildBatch.secondaryArtifacts[i].sha256sum")
i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("buildBatch.secondarySources")
While i < count_i
jResp.I = i
authResource = jResp.StringOf("buildBatch.secondarySources[i].auth.resource")
authType = jResp.StringOf("buildBatch.secondarySources[i].auth.type")
buildspec = jResp.StringOf("buildBatch.secondarySources[i].buildspec")
buildStatusConfigContext = jResp.StringOf("buildBatch.secondarySources[i].buildStatusConfig.context")
buildStatusConfigTargetUrl = jResp.StringOf("buildBatch.secondarySources[i].buildStatusConfig.targetUrl")
gitCloneDepth = jResp.IntOf("buildBatch.secondarySources[i].gitCloneDepth")
gitSubmodulesConfigFetchSubmodules = jResp.IntOf("buildBatch.secondarySources[i].gitSubmodulesConfig.fetchSubmodules")
insecureSsl = jResp.IntOf("buildBatch.secondarySources[i].insecureSsl")
location = jResp.StringOf("buildBatch.secondarySources[i].location")
reportBuildStatus = jResp.IntOf("buildBatch.secondarySources[i].reportBuildStatus")
sourceIdentifier = jResp.StringOf("buildBatch.secondarySources[i].sourceIdentifier")
v_type = jResp.StringOf("buildBatch.secondarySources[i].type")
i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("buildBatch.secondarySourceVersions")
While i < count_i
jResp.I = i
sourceIdentifier = jResp.StringOf("buildBatch.secondarySourceVersions[i].sourceIdentifier")
sourceVersion = jResp.StringOf("buildBatch.secondarySourceVersions[i].sourceVersion")
i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("buildBatch.vpcConfig.securityGroupIds")
While i < count_i
jResp.I = i
strVal = jResp.StringOf("buildBatch.vpcConfig.securityGroupIds[i]")
i = i + 1
Wend
i = 0
count_i = jResp.SizeOfArray("buildBatch.vpcConfig.subnets")
While i < count_i
jResp.I = i
strVal = jResp.StringOf("buildBatch.vpcConfig.subnets[i]")
i = i + 1
Wend
// 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"
// }
// }
// }