Chilkat Online Tools

BatchGetBuildBatches autoit Example

AWS CodeBuild

; This example requires the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.

$oRest = ObjCreate("Chilkat_9_5_0.Rest")
Local $bSuccess

$oAuthAws = ObjCreate("Chilkat_9_5_0.AuthAws")
$oAuthAws.AccessKey = "AWS_ACCESS_KEY"
$oAuthAws.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.)
$oAuthAws.Region = "us-west-2"
$oAuthAws.ServiceName = "codebuild"
; SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
$oRest.SetAuthAws($oAuthAws)

; URL: https://codebuild.us-west-2.amazonaws.com/
; Use the same region as specified above.
$bSuccess = $oRest.Connect("codebuild.us-west-2.amazonaws.com",443,True,True)
If ($bSuccess <> True) Then
    ConsoleWrite("ConnectFailReason: " & $oRest.ConnectFailReason & @CRLF)
    ConsoleWrite($oRest.LastErrorText & @CRLF)
    Exit
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

$oJson = ObjCreate("Chilkat_9_5_0.JsonObject")
$oJson.UpdateString("ids[0]","string")

; The JSON request body created by the above code:

; {
;   "ids": [
;     "string"
;   ]
; }

$oRest.AddHeader("Content-Type","application/x-amz-json-1.1")
$oRest.AddHeader("X-Amz-Target","CodeBuild_20161006.BatchGetBuildBatches")

$oSbRequestBody = ObjCreate("Chilkat_9_5_0.StringBuilder")
$oJson.EmitSb($oSbRequestBody)
$oSbResponseBody = ObjCreate("Chilkat_9_5_0.StringBuilder")
$bSuccess = $oRest.FullRequestSb("POST","/",$oSbRequestBody,$oSbResponseBody)
If ($bSuccess <> True) Then
    ConsoleWrite($oRest.LastErrorText & @CRLF)
    Exit
EndIf

Local $iRespStatusCode = $oRest.ResponseStatusCode
ConsoleWrite("response status code = " & $iRespStatusCode & @CRLF)
If ($iRespStatusCode <> 200) Then
    ConsoleWrite("Response Header:" & @CRLF)
    ConsoleWrite($oRest.ResponseHeader & @CRLF)
    ConsoleWrite("Response Body:" & @CRLF)
    ConsoleWrite($oSbResponseBody.GetAsString() & @CRLF)
    Exit
EndIf

$oJResp = ObjCreate("Chilkat_9_5_0.JsonObject")
$oJResp.LoadSb($oSbResponseBody)

; 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

Local $sArn
Local $sArtifactIdentifier
Local $sBucketOwnerAccess
Local $iEncryptionDisabled
Local $sLocation
Local $sMd5sum
Local $iOverrideArtifactName
Local $sSha256sum
Local $sBatchReportMode
Local $iCombineArtifacts
Local $iMaximumBuildsAllowed
Local $sServiceRole
Local $iTimeoutInMins
Local $iBuildBatchNumber
Local $sBuildBatchStatus
Local $iBuildTimeoutInMinutes
Local $sCacheLocation
Local $sV_Type
Local $iComplete
Local $sCurrentPhase
Local $iDebugSessionEnabled
Local $sEncryptionKey
Local $iEndTime
Local $sCertificate
Local $sComputeType
Local $sImage
Local $sImagePullCredentialsType
Local $iPrivilegedMode
Local $sCredential
Local $sCredentialProvider
Local $sEnvironmentType
Local $sId
Local $sInitiator
Local $sGroupName
Local $sStatus
Local $sStreamName
Local $sS3LogsBucketOwnerAccess
Local $iS3LogsEncryptionDisabled
Local $sS3LogsLocation
Local $sS3LogsStatus
Local $sProjectName
Local $iQueuedTimeoutInMinutes
Local $sResolvedSourceVersion
Local $serviceRole
Local $sResource
Local $sAuthType
Local $sBuildspec
Local $sContext
Local $sTargetUrl
Local $iGitCloneDepth
Local $iFetchSubmodules
Local $iInsecureSsl
Local $sourceLocation
Local $iReportBuildStatus
Local $sSourceIdentifier
Local $sourceType
Local $sourceVersion
Local $iStartTime
Local $sVpcId
Local $iJ
Local $iCount_j
Local $strVal
Local $sArn
Local $sBuildStatus
Local $sIdentifier
Local $sPrimaryArtifactLocation
Local $sPrimaryArtifactType
Local $iRequestedOn
Local $sIdentifier
Local $ignoreFailure
Local $iK
Local $iCount_k
Local $sLocation
Local $sV_type
Local $sBuildStatus
Local $sPrimaryArtifactIdentifier
Local $sPrimaryArtifactLocation
Local $sPrimaryArtifactType
Local $iRequestedOn
Local $oJson1
Local $i1
Local $iCount_i1
Local $sName
Local $sValue
Local $sMountOptions
Local $sMountPoint
Local $iDurationInSeconds
Local $sPhaseStatus
Local $sPhaseType
Local $sMessage
Local $statusCode
Local $sArtifactIdentifier
Local $sBucketOwnerAccess
Local $iEncryptionDisabled
Local $sMd5sum
Local $iOverrideArtifactName
Local $sha256sum
Local $sAuthResource
Local $sAuthType
Local $sBuildspec
Local $sBuildStatusConfigContext
Local $sBuildStatusConfigTargetUrl
Local $iGitCloneDepth
Local $iGitSubmodulesConfigFetchSubmodules
Local $insecureSsl
Local $iReportBuildStatus
Local $sourceIdentifier

Local $i = 0
Local $iCount_i = $oJResp.SizeOfArray("buildBatches")
While $i < $iCount_i
    $oJResp.I = $i
    $sArn = $oJResp.StringOf("buildBatches[i].arn")
    $sArtifactIdentifier = $oJResp.StringOf("buildBatches[i].artifacts.artifactIdentifier")
    $sBucketOwnerAccess = $oJResp.StringOf("buildBatches[i].artifacts.bucketOwnerAccess")
    $iEncryptionDisabled = $oJResp.IntOf("buildBatches[i].artifacts.encryptionDisabled")
    $sLocation = $oJResp.StringOf("buildBatches[i].artifacts.location")
    $sMd5sum = $oJResp.StringOf("buildBatches[i].artifacts.md5sum")
    $iOverrideArtifactName = $oJResp.IntOf("buildBatches[i].artifacts.overrideArtifactName")
    $sSha256sum = $oJResp.StringOf("buildBatches[i].artifacts.sha256sum")
    $sBatchReportMode = $oJResp.StringOf("buildBatches[i].buildBatchConfig.batchReportMode")
    $iCombineArtifacts = $oJResp.IntOf("buildBatches[i].buildBatchConfig.combineArtifacts")
    $iMaximumBuildsAllowed = $oJResp.IntOf("buildBatches[i].buildBatchConfig.restrictions.maximumBuildsAllowed")
    $sServiceRole = $oJResp.StringOf("buildBatches[i].buildBatchConfig.serviceRole")
    $iTimeoutInMins = $oJResp.IntOf("buildBatches[i].buildBatchConfig.timeoutInMins")
    $iBuildBatchNumber = $oJResp.IntOf("buildBatches[i].buildBatchNumber")
    $sBuildBatchStatus = $oJResp.StringOf("buildBatches[i].buildBatchStatus")
    $iBuildTimeoutInMinutes = $oJResp.IntOf("buildBatches[i].buildTimeoutInMinutes")
    $sCacheLocation = $oJResp.StringOf("buildBatches[i].cache.location")
    $sV_Type = $oJResp.StringOf("buildBatches[i].cache.type")
    $iComplete = $oJResp.IntOf("buildBatches[i].complete")
    $sCurrentPhase = $oJResp.StringOf("buildBatches[i].currentPhase")
    $iDebugSessionEnabled = $oJResp.IntOf("buildBatches[i].debugSessionEnabled")
    $sEncryptionKey = $oJResp.StringOf("buildBatches[i].encryptionKey")
    $iEndTime = $oJResp.IntOf("buildBatches[i].endTime")
    $sCertificate = $oJResp.StringOf("buildBatches[i].environment.certificate")
    $sComputeType = $oJResp.StringOf("buildBatches[i].environment.computeType")
    $sImage = $oJResp.StringOf("buildBatches[i].environment.image")
    $sImagePullCredentialsType = $oJResp.StringOf("buildBatches[i].environment.imagePullCredentialsType")
    $iPrivilegedMode = $oJResp.IntOf("buildBatches[i].environment.privilegedMode")
    $sCredential = $oJResp.StringOf("buildBatches[i].environment.registryCredential.credential")
    $sCredentialProvider = $oJResp.StringOf("buildBatches[i].environment.registryCredential.credentialProvider")
    $sEnvironmentType = $oJResp.StringOf("buildBatches[i].environment.type")
    $sId = $oJResp.StringOf("buildBatches[i].id")
    $sInitiator = $oJResp.StringOf("buildBatches[i].initiator")
    $sGroupName = $oJResp.StringOf("buildBatches[i].logConfig.cloudWatchLogs.groupName")
    $sStatus = $oJResp.StringOf("buildBatches[i].logConfig.cloudWatchLogs.status")
    $sStreamName = $oJResp.StringOf("buildBatches[i].logConfig.cloudWatchLogs.streamName")
    $sS3LogsBucketOwnerAccess = $oJResp.StringOf("buildBatches[i].logConfig.s3Logs.bucketOwnerAccess")
    $iS3LogsEncryptionDisabled = $oJResp.IntOf("buildBatches[i].logConfig.s3Logs.encryptionDisabled")
    $sS3LogsLocation = $oJResp.StringOf("buildBatches[i].logConfig.s3Logs.location")
    $sS3LogsStatus = $oJResp.StringOf("buildBatches[i].logConfig.s3Logs.status")
    $sProjectName = $oJResp.StringOf("buildBatches[i].projectName")
    $iQueuedTimeoutInMinutes = $oJResp.IntOf("buildBatches[i].queuedTimeoutInMinutes")
    $sResolvedSourceVersion = $oJResp.StringOf("buildBatches[i].resolvedSourceVersion")
    $serviceRole = $oJResp.StringOf("buildBatches[i].serviceRole")
    $sResource = $oJResp.StringOf("buildBatches[i].source.auth.resource")
    $sAuthType = $oJResp.StringOf("buildBatches[i].source.auth.type")
    $sBuildspec = $oJResp.StringOf("buildBatches[i].source.buildspec")
    $sContext = $oJResp.StringOf("buildBatches[i].source.buildStatusConfig.context")
    $sTargetUrl = $oJResp.StringOf("buildBatches[i].source.buildStatusConfig.targetUrl")
    $iGitCloneDepth = $oJResp.IntOf("buildBatches[i].source.gitCloneDepth")
    $iFetchSubmodules = $oJResp.IntOf("buildBatches[i].source.gitSubmodulesConfig.fetchSubmodules")
    $iInsecureSsl = $oJResp.IntOf("buildBatches[i].source.insecureSsl")
    $sourceLocation = $oJResp.StringOf("buildBatches[i].source.location")
    $iReportBuildStatus = $oJResp.IntOf("buildBatches[i].source.reportBuildStatus")
    $sSourceIdentifier = $oJResp.StringOf("buildBatches[i].source.sourceIdentifier")
    $sourceType = $oJResp.StringOf("buildBatches[i].source.type")
    $sourceVersion = $oJResp.StringOf("buildBatches[i].sourceVersion")
    $iStartTime = $oJResp.IntOf("buildBatches[i].startTime")
    $sVpcId = $oJResp.StringOf("buildBatches[i].vpcConfig.vpcId")
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("buildBatches[i].buildBatchConfig.restrictions.computeTypesAllowed")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $strVal = $oJResp.StringOf("buildBatches[i].buildBatchConfig.restrictions.computeTypesAllowed[j]")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("buildBatches[i].buildGroups")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sArn = $oJResp.StringOf("buildBatches[i].buildGroups[j].currentBuildSummary.arn")
        $sBuildStatus = $oJResp.StringOf("buildBatches[i].buildGroups[j].currentBuildSummary.buildStatus")
        $sIdentifier = $oJResp.StringOf("buildBatches[i].buildGroups[j].currentBuildSummary.primaryArtifact.identifier")
        $sPrimaryArtifactLocation = $oJResp.StringOf("buildBatches[i].buildGroups[j].currentBuildSummary.primaryArtifact.location")
        $sPrimaryArtifactType = $oJResp.StringOf("buildBatches[i].buildGroups[j].currentBuildSummary.primaryArtifact.type")
        $iRequestedOn = $oJResp.IntOf("buildBatches[i].buildGroups[j].currentBuildSummary.requestedOn")
        $sIdentifier = $oJResp.StringOf("buildBatches[i].buildGroups[j].identifier")
        $ignoreFailure = $oJResp.IntOf("buildBatches[i].buildGroups[j].ignoreFailure")
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("buildBatches[i].buildGroups[j].currentBuildSummary.secondaryArtifacts")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $sIdentifier = $oJResp.StringOf("buildBatches[i].buildGroups[j].currentBuildSummary.secondaryArtifacts[k].identifier")
            $sLocation = $oJResp.StringOf("buildBatches[i].buildGroups[j].currentBuildSummary.secondaryArtifacts[k].location")
            $sV_type = $oJResp.StringOf("buildBatches[i].buildGroups[j].currentBuildSummary.secondaryArtifacts[k].type")
            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("buildBatches[i].buildGroups[j].dependsOn")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $strVal = $oJResp.StringOf("buildBatches[i].buildGroups[j].dependsOn[k]")
            $iK = $iK + 1
        Wend
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("buildBatches[i].buildGroups[j].priorBuildSummaryList")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $sArn = $oJResp.StringOf("buildBatches[i].buildGroups[j].priorBuildSummaryList[k].arn")
            $sBuildStatus = $oJResp.StringOf("buildBatches[i].buildGroups[j].priorBuildSummaryList[k].buildStatus")
            $sPrimaryArtifactIdentifier = $oJResp.StringOf("buildBatches[i].buildGroups[j].priorBuildSummaryList[k].primaryArtifact.identifier")
            $sPrimaryArtifactLocation = $oJResp.StringOf("buildBatches[i].buildGroups[j].priorBuildSummaryList[k].primaryArtifact.location")
            $sPrimaryArtifactType = $oJResp.StringOf("buildBatches[i].buildGroups[j].priorBuildSummaryList[k].primaryArtifact.type")
            $iRequestedOn = $oJResp.IntOf("buildBatches[i].buildGroups[j].priorBuildSummaryList[k].requestedOn")

            $oJson1 = $oJResp.ObjectOf("buildBatches[i].buildGroups[j].priorBuildSummaryList[k]")
            $i1 = 0
            $iCount_i1 = $oJson1.SizeOfArray("secondaryArtifacts")
            While $i1 < $iCount_i1
                $oJson1.I = $i1
                $sIdentifier = $oJson1.StringOf("secondaryArtifacts[i].identifier")
                $sLocation = $oJson1.StringOf("secondaryArtifacts[i].location")
                $sV_type = $oJson1.StringOf("secondaryArtifacts[i].type")
                $i1 = $i1 + 1
            Wend

            $iK = $iK + 1
        Wend
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("buildBatches[i].cache.modes")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $strVal = $oJResp.StringOf("buildBatches[i].cache.modes[j]")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("buildBatches[i].environment.environmentVariables")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sName = $oJResp.StringOf("buildBatches[i].environment.environmentVariables[j].name")
        $sV_type = $oJResp.StringOf("buildBatches[i].environment.environmentVariables[j].type")
        $sValue = $oJResp.StringOf("buildBatches[i].environment.environmentVariables[j].value")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("buildBatches[i].fileSystemLocations")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sIdentifier = $oJResp.StringOf("buildBatches[i].fileSystemLocations[j].identifier")
        $sLocation = $oJResp.StringOf("buildBatches[i].fileSystemLocations[j].location")
        $sMountOptions = $oJResp.StringOf("buildBatches[i].fileSystemLocations[j].mountOptions")
        $sMountPoint = $oJResp.StringOf("buildBatches[i].fileSystemLocations[j].mountPoint")
        $sV_type = $oJResp.StringOf("buildBatches[i].fileSystemLocations[j].type")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("buildBatches[i].phases")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $iDurationInSeconds = $oJResp.IntOf("buildBatches[i].phases[j].durationInSeconds")
        $iEndTime = $oJResp.IntOf("buildBatches[i].phases[j].endTime")
        $sPhaseStatus = $oJResp.StringOf("buildBatches[i].phases[j].phaseStatus")
        $sPhaseType = $oJResp.StringOf("buildBatches[i].phases[j].phaseType")
        $iStartTime = $oJResp.IntOf("buildBatches[i].phases[j].startTime")
        $iK = 0
        $iCount_k = $oJResp.SizeOfArray("buildBatches[i].phases[j].contexts")
        While $iK < $iCount_k
            $oJResp.K = $iK
            $sMessage = $oJResp.StringOf("buildBatches[i].phases[j].contexts[k].message")
            $statusCode = $oJResp.StringOf("buildBatches[i].phases[j].contexts[k].statusCode")
            $iK = $iK + 1
        Wend
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("buildBatches[i].secondaryArtifacts")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sArtifactIdentifier = $oJResp.StringOf("buildBatches[i].secondaryArtifacts[j].artifactIdentifier")
        $sBucketOwnerAccess = $oJResp.StringOf("buildBatches[i].secondaryArtifacts[j].bucketOwnerAccess")
        $iEncryptionDisabled = $oJResp.IntOf("buildBatches[i].secondaryArtifacts[j].encryptionDisabled")
        $sLocation = $oJResp.StringOf("buildBatches[i].secondaryArtifacts[j].location")
        $sMd5sum = $oJResp.StringOf("buildBatches[i].secondaryArtifacts[j].md5sum")
        $iOverrideArtifactName = $oJResp.IntOf("buildBatches[i].secondaryArtifacts[j].overrideArtifactName")
        $sha256sum = $oJResp.StringOf("buildBatches[i].secondaryArtifacts[j].sha256sum")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("buildBatches[i].secondarySources")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sAuthResource = $oJResp.StringOf("buildBatches[i].secondarySources[j].auth.resource")
        $sAuthType = $oJResp.StringOf("buildBatches[i].secondarySources[j].auth.type")
        $sBuildspec = $oJResp.StringOf("buildBatches[i].secondarySources[j].buildspec")
        $sBuildStatusConfigContext = $oJResp.StringOf("buildBatches[i].secondarySources[j].buildStatusConfig.context")
        $sBuildStatusConfigTargetUrl = $oJResp.StringOf("buildBatches[i].secondarySources[j].buildStatusConfig.targetUrl")
        $iGitCloneDepth = $oJResp.IntOf("buildBatches[i].secondarySources[j].gitCloneDepth")
        $iGitSubmodulesConfigFetchSubmodules = $oJResp.IntOf("buildBatches[i].secondarySources[j].gitSubmodulesConfig.fetchSubmodules")
        $insecureSsl = $oJResp.IntOf("buildBatches[i].secondarySources[j].insecureSsl")
        $sLocation = $oJResp.StringOf("buildBatches[i].secondarySources[j].location")
        $iReportBuildStatus = $oJResp.IntOf("buildBatches[i].secondarySources[j].reportBuildStatus")
        $sourceIdentifier = $oJResp.StringOf("buildBatches[i].secondarySources[j].sourceIdentifier")
        $sV_type = $oJResp.StringOf("buildBatches[i].secondarySources[j].type")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("buildBatches[i].secondarySourceVersions")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $sourceIdentifier = $oJResp.StringOf("buildBatches[i].secondarySourceVersions[j].sourceIdentifier")
        $sourceVersion = $oJResp.StringOf("buildBatches[i].secondarySourceVersions[j].sourceVersion")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("buildBatches[i].vpcConfig.securityGroupIds")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $strVal = $oJResp.StringOf("buildBatches[i].vpcConfig.securityGroupIds[j]")
        $iJ = $iJ + 1
    Wend
    $iJ = 0
    $iCount_j = $oJResp.SizeOfArray("buildBatches[i].vpcConfig.subnets")
    While $iJ < $iCount_j
        $oJResp.J = $iJ
        $strVal = $oJResp.StringOf("buildBatches[i].vpcConfig.subnets[j]")
        $iJ = $iJ + 1
    Wend
    $i = $i + 1
Wend
$i = 0
$iCount_i = $oJResp.SizeOfArray("buildBatchesNotFound")
While $i < $iCount_i
    $oJResp.I = $i
    $strVal = $oJResp.StringOf("buildBatchesNotFound[i]")
    $i = $i + 1
Wend

; A sample JSON response body parsed by the above code:

; {
;   "buildBatches": [
;     {
;       "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"
;       }
;     }
;   ],
;   "buildBatchesNotFound": [
;     "string"
;   ]
; }