StartBuild Foxpro Example
LOCAL loRest
LOCAL lnSuccess
LOCAL loAuthAws
LOCAL loJson
LOCAL loSbRequestBody
LOCAL loSbResponseBody
LOCAL lnRespStatusCode
LOCAL loJResp
LOCAL lcStrVal
LOCAL lcName
LOCAL lcV_type
LOCAL lcValue
LOCAL lcIdentifier
LOCAL lcLocation
LOCAL lcMountOptions
LOCAL lcMountPoint
LOCAL lnDurationInSeconds
LOCAL lnEndTime
LOCAL lcPhaseStatus
LOCAL lcPhaseType
LOCAL lnStartTime
LOCAL j
LOCAL lnCount_j
LOCAL lcMessage
LOCAL lcStatusCode
LOCAL lcArtifactIdentifier
LOCAL lcBucketOwnerAccess
LOCAL lnEncryptionDisabled
LOCAL lcMd5sum
LOCAL lnOverrideArtifactName
LOCAL lcSha256sum
LOCAL lcAuthResource
LOCAL lcAuthType
LOCAL lcBuildspec
LOCAL lcBuildStatusConfigContext
LOCAL lcBuildStatusConfigTargetUrl
LOCAL lnGitCloneDepth
LOCAL lnGitSubmodulesConfigFetchSubmodules
LOCAL lnInsecureSsl
LOCAL lnReportBuildStatus
LOCAL lcSourceIdentifier
LOCAL lcSourceVersion
LOCAL lcArn
LOCAL lcArtifactIdentifier
LOCAL lcBucketOwnerAccess
LOCAL lnEncryptionDisabled
LOCAL lcLocation
LOCAL lcMd5sum
LOCAL lnOverrideArtifactName
LOCAL lcSha256sum
LOCAL lcBuildBatchArn
LOCAL lnBuildComplete
LOCAL lnBuildNumber
LOCAL lcBuildStatus
LOCAL lcCacheLocation
LOCAL lcV_Type
LOCAL lcCurrentPhase
LOCAL lnSessionEnabled
LOCAL lcSessionTarget
LOCAL lcEncryptionKey
LOCAL lnEndTime
LOCAL lcCertificate
LOCAL lcComputeType
LOCAL lcImage
LOCAL lcImagePullCredentialsType
LOCAL lnPrivilegedMode
LOCAL lcCredential
LOCAL lcCredentialProvider
LOCAL lcEnvironmentType
LOCAL lcId
LOCAL lcInitiator
LOCAL lcGroupName
LOCAL lcStatus
LOCAL lcStreamName
LOCAL lcCloudWatchLogsArn
LOCAL lcDeepLink
LOCAL lcLogsGroupName
LOCAL lcS3DeepLink
LOCAL lcS3LogsBucketOwnerAccess
LOCAL lnS3LogsEncryptionDisabled
LOCAL lcS3LogsLocation
LOCAL lcS3LogsStatus
LOCAL lcS3LogsArn
LOCAL lcLogsStreamName
LOCAL lcNetworkInterfaceId
LOCAL lcSubnetId
LOCAL lcProjectName
LOCAL lnQueuedTimeoutInMinutes
LOCAL lcResolvedSourceVersion
LOCAL lcServiceRole
LOCAL lcResource
LOCAL lcAuthType
LOCAL lcBuildspec
LOCAL lcContext
LOCAL lcTargetUrl
LOCAL lnGitCloneDepth
LOCAL lnFetchSubmodules
LOCAL lnInsecureSsl
LOCAL lcSourceLocation
LOCAL lnReportBuildStatus
LOCAL lcSourceIdentifier
LOCAL lcSourceType
LOCAL lcSourceVersion
LOCAL lnStartTime
LOCAL lnTimeoutInMinutes
LOCAL lcVpcId
LOCAL i
LOCAL lnCount_i
* This example requires the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
loRest = CreateObject('Chilkat_9_5_0.Rest')
loAuthAws = CreateObject('Chilkat_9_5_0.AuthAws')
loAuthAws.AccessKey = "AWS_ACCESS_KEY"
loAuthAws.SecretKey = "AWS_SECRET_KEY"
* Don't forget to change the region to your particular region. (Also make the same change in the call to Connect below.)
loAuthAws.Region = "us-west-2"
loAuthAws.ServiceName = "codebuild"
* SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
loRest.SetAuthAws(loAuthAws)
* URL: https://codebuild.us-west-2.amazonaws.com/
* Use the same region as specified above.
lnSuccess = loRest.Connect("codebuild.us-west-2.amazonaws.com",443,1,1)
IF (lnSuccess <> 1) THEN
? "ConnectFailReason: " + STR(loRest.ConnectFailReason)
? loRest.LastErrorText
RELEASE loRest
RELEASE loAuthAws
CANCEL
ENDIF
* 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
loJson = CreateObject('Chilkat_9_5_0.JsonObject')
loJson.UpdateString("artifactsOverride.artifactIdentifier","string")
loJson.UpdateString("artifactsOverride.bucketOwnerAccess","string")
loJson.UpdateInt("artifactsOverride.encryptionDisabled",123)
loJson.UpdateString("artifactsOverride.location","string")
loJson.UpdateString("artifactsOverride.name","string")
loJson.UpdateString("artifactsOverride.namespaceType","string")
loJson.UpdateInt("artifactsOverride.overrideArtifactName",123)
loJson.UpdateString("artifactsOverride.packaging","string")
loJson.UpdateString("artifactsOverride.path","string")
loJson.UpdateString("artifactsOverride.type","string")
loJson.UpdateString("buildspecOverride","string")
loJson.UpdateString("buildStatusConfigOverride.context","string")
loJson.UpdateString("buildStatusConfigOverride.targetUrl","string")
loJson.UpdateString("cacheOverride.location","string")
loJson.UpdateString("cacheOverride.modes[0]","string")
loJson.UpdateString("cacheOverride.type","string")
loJson.UpdateString("certificateOverride","string")
loJson.UpdateString("computeTypeOverride","string")
loJson.UpdateInt("debugSessionEnabled",123)
loJson.UpdateString("encryptionKeyOverride","string")
loJson.UpdateString("environmentTypeOverride","string")
loJson.UpdateString("environmentVariablesOverride[0].name","string")
loJson.UpdateString("environmentVariablesOverride[0].type","string")
loJson.UpdateString("environmentVariablesOverride[0].value","string")
loJson.UpdateInt("gitCloneDepthOverride",123)
loJson.UpdateInt("gitSubmodulesConfigOverride.fetchSubmodules",123)
loJson.UpdateString("idempotencyToken","string")
loJson.UpdateString("imageOverride","string")
loJson.UpdateString("imagePullCredentialsTypeOverride","string")
loJson.UpdateInt("insecureSslOverride",123)
loJson.UpdateString("logsConfigOverride.cloudWatchLogs.groupName","string")
loJson.UpdateString("logsConfigOverride.cloudWatchLogs.status","string")
loJson.UpdateString("logsConfigOverride.cloudWatchLogs.streamName","string")
loJson.UpdateString("logsConfigOverride.s3Logs.bucketOwnerAccess","string")
loJson.UpdateInt("logsConfigOverride.s3Logs.encryptionDisabled",123)
loJson.UpdateString("logsConfigOverride.s3Logs.location","string")
loJson.UpdateString("logsConfigOverride.s3Logs.status","string")
loJson.UpdateInt("privilegedModeOverride",123)
loJson.UpdateString("projectName","string")
loJson.UpdateInt("queuedTimeoutInMinutesOverride",123)
loJson.UpdateString("registryCredentialOverride.credential","string")
loJson.UpdateString("registryCredentialOverride.credentialProvider","string")
loJson.UpdateInt("reportBuildStatusOverride",123)
loJson.UpdateString("secondaryArtifactsOverride[0].artifactIdentifier","string")
loJson.UpdateString("secondaryArtifactsOverride[0].bucketOwnerAccess","string")
loJson.UpdateInt("secondaryArtifactsOverride[0].encryptionDisabled",123)
loJson.UpdateString("secondaryArtifactsOverride[0].location","string")
loJson.UpdateString("secondaryArtifactsOverride[0].name","string")
loJson.UpdateString("secondaryArtifactsOverride[0].namespaceType","string")
loJson.UpdateInt("secondaryArtifactsOverride[0].overrideArtifactName",123)
loJson.UpdateString("secondaryArtifactsOverride[0].packaging","string")
loJson.UpdateString("secondaryArtifactsOverride[0].path","string")
loJson.UpdateString("secondaryArtifactsOverride[0].type","string")
loJson.UpdateString("secondarySourcesOverride[0].auth.resource","string")
loJson.UpdateString("secondarySourcesOverride[0].auth.type","string")
loJson.UpdateString("secondarySourcesOverride[0].buildspec","string")
loJson.UpdateString("secondarySourcesOverride[0].buildStatusConfig.context","string")
loJson.UpdateString("secondarySourcesOverride[0].buildStatusConfig.targetUrl","string")
loJson.UpdateInt("secondarySourcesOverride[0].gitCloneDepth",123)
loJson.UpdateInt("secondarySourcesOverride[0].gitSubmodulesConfig.fetchSubmodules",123)
loJson.UpdateInt("secondarySourcesOverride[0].insecureSsl",123)
loJson.UpdateString("secondarySourcesOverride[0].location","string")
loJson.UpdateInt("secondarySourcesOverride[0].reportBuildStatus",123)
loJson.UpdateString("secondarySourcesOverride[0].sourceIdentifier","string")
loJson.UpdateString("secondarySourcesOverride[0].type","string")
loJson.UpdateString("secondarySourcesVersionOverride[0].sourceIdentifier","string")
loJson.UpdateString("secondarySourcesVersionOverride[0].sourceVersion","string")
loJson.UpdateString("serviceRoleOverride","string")
loJson.UpdateString("sourceAuthOverride.resource","string")
loJson.UpdateString("sourceAuthOverride.type","string")
loJson.UpdateString("sourceLocationOverride","string")
loJson.UpdateString("sourceTypeOverride","string")
loJson.UpdateString("sourceVersion","string")
loJson.UpdateInt("timeoutInMinutesOverride",123)
* 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"
* },
* "buildspecOverride": "string",
* "buildStatusConfigOverride": {
* "context": "string",
* "targetUrl": "string"
* },
* "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"
* },
* "reportBuildStatusOverride": 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",
* "timeoutInMinutesOverride": number
* }
loRest.AddHeader("Content-Type","application/x-amz-json-1.1")
loRest.AddHeader("X-Amz-Target","CodeBuild_20161006.StartBuild")
loSbRequestBody = CreateObject('Chilkat_9_5_0.StringBuilder')
loJson.EmitSb(loSbRequestBody)
loSbResponseBody = CreateObject('Chilkat_9_5_0.StringBuilder')
lnSuccess = loRest.FullRequestSb("POST","/",loSbRequestBody,loSbResponseBody)
IF (lnSuccess <> 1) THEN
? loRest.LastErrorText
RELEASE loRest
RELEASE loAuthAws
RELEASE loJson
RELEASE loSbRequestBody
RELEASE loSbResponseBody
CANCEL
ENDIF
lnRespStatusCode = loRest.ResponseStatusCode
? "response status code = " + STR(lnRespStatusCode)
IF (lnRespStatusCode <> 200) THEN
? "Response Header:"
? loRest.ResponseHeader
? "Response Body:"
? loSbResponseBody.GetAsString()
RELEASE loRest
RELEASE loAuthAws
RELEASE loJson
RELEASE loSbRequestBody
RELEASE loSbResponseBody
CANCEL
ENDIF
loJResp = CreateObject('Chilkat_9_5_0.JsonObject')
loJResp.LoadSb(loSbResponseBody)
* The following code parses the JSON response.
* A sample JSON response is shown below the sample code.
* Use this online tool to generate parsing code from sample JSON:
* Generate Parsing Code from JSON
lcArn = loJResp.StringOf("build.arn")
lcArtifactIdentifier = loJResp.StringOf("build.artifacts.artifactIdentifier")
lcBucketOwnerAccess = loJResp.StringOf("build.artifacts.bucketOwnerAccess")
lnEncryptionDisabled = loJResp.IntOf("build.artifacts.encryptionDisabled")
lcLocation = loJResp.StringOf("build.artifacts.location")
lcMd5sum = loJResp.StringOf("build.artifacts.md5sum")
lnOverrideArtifactName = loJResp.IntOf("build.artifacts.overrideArtifactName")
lcSha256sum = loJResp.StringOf("build.artifacts.sha256sum")
lcBuildBatchArn = loJResp.StringOf("build.buildBatchArn")
lnBuildComplete = loJResp.IntOf("build.buildComplete")
lnBuildNumber = loJResp.IntOf("build.buildNumber")
lcBuildStatus = loJResp.StringOf("build.buildStatus")
lcCacheLocation = loJResp.StringOf("build.cache.location")
lcV_Type = loJResp.StringOf("build.cache.type")
lcCurrentPhase = loJResp.StringOf("build.currentPhase")
lnSessionEnabled = loJResp.IntOf("build.debugSession.sessionEnabled")
lcSessionTarget = loJResp.StringOf("build.debugSession.sessionTarget")
lcEncryptionKey = loJResp.StringOf("build.encryptionKey")
lnEndTime = loJResp.IntOf("build.endTime")
lcCertificate = loJResp.StringOf("build.environment.certificate")
lcComputeType = loJResp.StringOf("build.environment.computeType")
lcImage = loJResp.StringOf("build.environment.image")
lcImagePullCredentialsType = loJResp.StringOf("build.environment.imagePullCredentialsType")
lnPrivilegedMode = loJResp.IntOf("build.environment.privilegedMode")
lcCredential = loJResp.StringOf("build.environment.registryCredential.credential")
lcCredentialProvider = loJResp.StringOf("build.environment.registryCredential.credentialProvider")
lcEnvironmentType = loJResp.StringOf("build.environment.type")
lcId = loJResp.StringOf("build.id")
lcInitiator = loJResp.StringOf("build.initiator")
lcGroupName = loJResp.StringOf("build.logs.cloudWatchLogs.groupName")
lcStatus = loJResp.StringOf("build.logs.cloudWatchLogs.status")
lcStreamName = loJResp.StringOf("build.logs.cloudWatchLogs.streamName")
lcCloudWatchLogsArn = loJResp.StringOf("build.logs.cloudWatchLogsArn")
lcDeepLink = loJResp.StringOf("build.logs.deepLink")
lcLogsGroupName = loJResp.StringOf("build.logs.groupName")
lcS3DeepLink = loJResp.StringOf("build.logs.s3DeepLink")
lcS3LogsBucketOwnerAccess = loJResp.StringOf("build.logs.s3Logs.bucketOwnerAccess")
lnS3LogsEncryptionDisabled = loJResp.IntOf("build.logs.s3Logs.encryptionDisabled")
lcS3LogsLocation = loJResp.StringOf("build.logs.s3Logs.location")
lcS3LogsStatus = loJResp.StringOf("build.logs.s3Logs.status")
lcS3LogsArn = loJResp.StringOf("build.logs.s3LogsArn")
lcLogsStreamName = loJResp.StringOf("build.logs.streamName")
lcNetworkInterfaceId = loJResp.StringOf("build.networkInterface.networkInterfaceId")
lcSubnetId = loJResp.StringOf("build.networkInterface.subnetId")
lcProjectName = loJResp.StringOf("build.projectName")
lnQueuedTimeoutInMinutes = loJResp.IntOf("build.queuedTimeoutInMinutes")
lcResolvedSourceVersion = loJResp.StringOf("build.resolvedSourceVersion")
lcServiceRole = loJResp.StringOf("build.serviceRole")
lcResource = loJResp.StringOf("build.source.auth.resource")
lcAuthType = loJResp.StringOf("build.source.auth.type")
lcBuildspec = loJResp.StringOf("build.source.buildspec")
lcContext = loJResp.StringOf("build.source.buildStatusConfig.context")
lcTargetUrl = loJResp.StringOf("build.source.buildStatusConfig.targetUrl")
lnGitCloneDepth = loJResp.IntOf("build.source.gitCloneDepth")
lnFetchSubmodules = loJResp.IntOf("build.source.gitSubmodulesConfig.fetchSubmodules")
lnInsecureSsl = loJResp.IntOf("build.source.insecureSsl")
lcSourceLocation = loJResp.StringOf("build.source.location")
lnReportBuildStatus = loJResp.IntOf("build.source.reportBuildStatus")
lcSourceIdentifier = loJResp.StringOf("build.source.sourceIdentifier")
lcSourceType = loJResp.StringOf("build.source.type")
lcSourceVersion = loJResp.StringOf("build.sourceVersion")
lnStartTime = loJResp.IntOf("build.startTime")
lnTimeoutInMinutes = loJResp.IntOf("build.timeoutInMinutes")
lcVpcId = loJResp.StringOf("build.vpcConfig.vpcId")
i = 0
lnCount_i = loJResp.SizeOfArray("build.cache.modes")
DO WHILE i < lnCount_i
loJResp.I = i
lcStrVal = loJResp.StringOf("build.cache.modes[i]")
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("build.environment.environmentVariables")
DO WHILE i < lnCount_i
loJResp.I = i
lcName = loJResp.StringOf("build.environment.environmentVariables[i].name")
lcV_type = loJResp.StringOf("build.environment.environmentVariables[i].type")
lcValue = loJResp.StringOf("build.environment.environmentVariables[i].value")
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("build.exportedEnvironmentVariables")
DO WHILE i < lnCount_i
loJResp.I = i
lcName = loJResp.StringOf("build.exportedEnvironmentVariables[i].name")
lcValue = loJResp.StringOf("build.exportedEnvironmentVariables[i].value")
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("build.fileSystemLocations")
DO WHILE i < lnCount_i
loJResp.I = i
lcIdentifier = loJResp.StringOf("build.fileSystemLocations[i].identifier")
lcLocation = loJResp.StringOf("build.fileSystemLocations[i].location")
lcMountOptions = loJResp.StringOf("build.fileSystemLocations[i].mountOptions")
lcMountPoint = loJResp.StringOf("build.fileSystemLocations[i].mountPoint")
lcV_type = loJResp.StringOf("build.fileSystemLocations[i].type")
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("build.phases")
DO WHILE i < lnCount_i
loJResp.I = i
lnDurationInSeconds = loJResp.IntOf("build.phases[i].durationInSeconds")
lnEndTime = loJResp.IntOf("build.phases[i].endTime")
lcPhaseStatus = loJResp.StringOf("build.phases[i].phaseStatus")
lcPhaseType = loJResp.StringOf("build.phases[i].phaseType")
lnStartTime = loJResp.IntOf("build.phases[i].startTime")
j = 0
lnCount_j = loJResp.SizeOfArray("build.phases[i].contexts")
DO WHILE j < lnCount_j
loJResp.J = j
lcMessage = loJResp.StringOf("build.phases[i].contexts[j].message")
lcStatusCode = loJResp.StringOf("build.phases[i].contexts[j].statusCode")
j = j + 1
ENDDO
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("build.reportArns")
DO WHILE i < lnCount_i
loJResp.I = i
lcStrVal = loJResp.StringOf("build.reportArns[i]")
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("build.secondaryArtifacts")
DO WHILE i < lnCount_i
loJResp.I = i
lcArtifactIdentifier = loJResp.StringOf("build.secondaryArtifacts[i].artifactIdentifier")
lcBucketOwnerAccess = loJResp.StringOf("build.secondaryArtifacts[i].bucketOwnerAccess")
lnEncryptionDisabled = loJResp.IntOf("build.secondaryArtifacts[i].encryptionDisabled")
lcLocation = loJResp.StringOf("build.secondaryArtifacts[i].location")
lcMd5sum = loJResp.StringOf("build.secondaryArtifacts[i].md5sum")
lnOverrideArtifactName = loJResp.IntOf("build.secondaryArtifacts[i].overrideArtifactName")
lcSha256sum = loJResp.StringOf("build.secondaryArtifacts[i].sha256sum")
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("build.secondarySources")
DO WHILE i < lnCount_i
loJResp.I = i
lcAuthResource = loJResp.StringOf("build.secondarySources[i].auth.resource")
lcAuthType = loJResp.StringOf("build.secondarySources[i].auth.type")
lcBuildspec = loJResp.StringOf("build.secondarySources[i].buildspec")
lcBuildStatusConfigContext = loJResp.StringOf("build.secondarySources[i].buildStatusConfig.context")
lcBuildStatusConfigTargetUrl = loJResp.StringOf("build.secondarySources[i].buildStatusConfig.targetUrl")
lnGitCloneDepth = loJResp.IntOf("build.secondarySources[i].gitCloneDepth")
lnGitSubmodulesConfigFetchSubmodules = loJResp.IntOf("build.secondarySources[i].gitSubmodulesConfig.fetchSubmodules")
lnInsecureSsl = loJResp.IntOf("build.secondarySources[i].insecureSsl")
lcLocation = loJResp.StringOf("build.secondarySources[i].location")
lnReportBuildStatus = loJResp.IntOf("build.secondarySources[i].reportBuildStatus")
lcSourceIdentifier = loJResp.StringOf("build.secondarySources[i].sourceIdentifier")
lcV_type = loJResp.StringOf("build.secondarySources[i].type")
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("build.secondarySourceVersions")
DO WHILE i < lnCount_i
loJResp.I = i
lcSourceIdentifier = loJResp.StringOf("build.secondarySourceVersions[i].sourceIdentifier")
lcSourceVersion = loJResp.StringOf("build.secondarySourceVersions[i].sourceVersion")
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("build.vpcConfig.securityGroupIds")
DO WHILE i < lnCount_i
loJResp.I = i
lcStrVal = loJResp.StringOf("build.vpcConfig.securityGroupIds[i]")
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("build.vpcConfig.subnets")
DO WHILE i < lnCount_i
loJResp.I = i
lcStrVal = loJResp.StringOf("build.vpcConfig.subnets[i]")
i = i + 1
ENDDO
* A sample JSON response body parsed by the above code:
* {
* "build": {
* "arn": "string",
* "artifacts": {
* "artifactIdentifier": "string",
* "bucketOwnerAccess": "string",
* "encryptionDisabled": boolean,
* "location": "string",
* "md5sum": "string",
* "overrideArtifactName": boolean,
* "sha256sum": "string"
* },
* "buildBatchArn": "string",
* "buildComplete": boolean,
* "buildNumber": number,
* "buildStatus": "string",
* "cache": {
* "location": "string",
* "modes": [
* "string"
* ],
* "type": "string"
* },
* "currentPhase": "string",
* "debugSession": {
* "sessionEnabled": boolean,
* "sessionTarget": "string"
* },
* "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"
* },
* "exportedEnvironmentVariables": [
* {
* "name": "string",
* "value": "string"
* }
* ],
* "fileSystemLocations": [
* {
* "identifier": "string",
* "location": "string",
* "mountOptions": "string",
* "mountPoint": "string",
* "type": "string"
* }
* ],
* "id": "string",
* "initiator": "string",
* "logs": {
* "cloudWatchLogs": {
* "groupName": "string",
* "status": "string",
* "streamName": "string"
* },
* "cloudWatchLogsArn": "string",
* "deepLink": "string",
* "groupName": "string",
* "s3DeepLink": "string",
* "s3Logs": {
* "bucketOwnerAccess": "string",
* "encryptionDisabled": boolean,
* "location": "string",
* "status": "string"
* },
* "s3LogsArn": "string",
* "streamName": "string"
* },
* "networkInterface": {
* "networkInterfaceId": "string",
* "subnetId": "string"
* },
* "phases": [
* {
* "contexts": [
* {
* "message": "string",
* "statusCode": "string"
* }
* ],
* "durationInSeconds": number,
* "endTime": number,
* "phaseStatus": "string",
* "phaseType": "string",
* "startTime": number
* }
* ],
* "projectName": "string",
* "queuedTimeoutInMinutes": number,
* "reportArns": [
* "string"
* ],
* "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,
* "timeoutInMinutes": number,
* "vpcConfig": {
* "securityGroupIds": [
* "string"
* ],
* "subnets": [
* "string"
* ],
* "vpcId": "string"
* }
* }
* }
RELEASE loRest
RELEASE loAuthAws
RELEASE loJson
RELEASE loSbRequestBody
RELEASE loSbResponseBody
RELEASE loJResp