Chilkat Online Tools

BatchGetBuilds PureBasic Example

AWS CodeBuild

IncludeFile "CkJsonObject.pb"
IncludeFile "CkStringBuilder.pb"
IncludeFile "CkRest.pb"
IncludeFile "CkAuthAws.pb"

Procedure ChilkatExample()

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

    rest.i = CkRest::ckCreate()
    If rest.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    success.i

    authAws.i = CkAuthAws::ckCreate()
    If authAws.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkAuthAws::setCkAccessKey(authAws, "AWS_ACCESS_KEY")
    CkAuthAws::setCkSecretKey(authAws, "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.)
    CkAuthAws::setCkRegion(authAws, "us-west-2")
    CkAuthAws::setCkServiceName(authAws, "codebuild")
    ; SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
    CkRest::ckSetAuthAws(rest,authAws)

    ; URL: https://codebuild.us-west-2.amazonaws.com/
    ; Use the same region as specified above.
    success = CkRest::ckConnect(rest,"codebuild.us-west-2.amazonaws.com",443,1,1)
    If success <> 1
        Debug "ConnectFailReason: " + Str(CkRest::ckConnectFailReason(rest))
        Debug CkRest::ckLastErrorText(rest)
        CkRest::ckDispose(rest)
        CkAuthAws::ckDispose(authAws)
        ProcedureReturn
    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

    json.i = CkJsonObject::ckCreate()
    If json.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckUpdateString(json,"ids[0]","string")

    ; The JSON request body created by the above code:

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

    CkRest::ckAddHeader(rest,"Content-Type","application/x-amz-json-1.1")
    CkRest::ckAddHeader(rest,"X-Amz-Target","CodeBuild_20161006.BatchGetBuilds")

    sbRequestBody.i = CkStringBuilder::ckCreate()
    If sbRequestBody.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckEmitSb(json,sbRequestBody)
    sbResponseBody.i = CkStringBuilder::ckCreate()
    If sbResponseBody.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    success = CkRest::ckFullRequestSb(rest,"POST","/",sbRequestBody,sbResponseBody)
    If success <> 1
        Debug CkRest::ckLastErrorText(rest)
        CkRest::ckDispose(rest)
        CkAuthAws::ckDispose(authAws)
        CkJsonObject::ckDispose(json)
        CkStringBuilder::ckDispose(sbRequestBody)
        CkStringBuilder::ckDispose(sbResponseBody)
        ProcedureReturn
    EndIf

    respStatusCode.i = CkRest::ckResponseStatusCode(rest)
    Debug "response status code = " + Str(respStatusCode)
    If respStatusCode <> 200
        Debug "Response Header:"
        Debug CkRest::ckResponseHeader(rest)
        Debug "Response Body:"
        Debug CkStringBuilder::ckGetAsString(sbResponseBody)
        CkRest::ckDispose(rest)
        CkAuthAws::ckDispose(authAws)
        CkJsonObject::ckDispose(json)
        CkStringBuilder::ckDispose(sbRequestBody)
        CkStringBuilder::ckDispose(sbResponseBody)
        ProcedureReturn
    EndIf

    jResp.i = CkJsonObject::ckCreate()
    If jResp.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckLoadSb(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

    arn.s
    ArtifactIdentifier.s
    BucketOwnerAccess.s
    EncryptionDisabled.i
    Location.s
    Md5sum.s
    OverrideArtifactName.i
    Sha256sum.s
    buildBatchArn.s
    buildComplete.i
    buildNumber.i
    buildStatus.s
    cacheLocation.s
    v_Type.s
    currentPhase.s
    SessionEnabled.i
    SessionTarget.s
    encryptionKey.s
    endTime.i
    Certificate.s
    ComputeType.s
    Image.s
    ImagePullCredentialsType.s
    PrivilegedMode.i
    Credential.s
    CredentialProvider.s
    environmentType.s
    id.s
    initiator.s
    GroupName.s
    Status.s
    StreamName.s
    CloudWatchLogsArn.s
    DeepLink.s
    logsGroupName.s
    S3DeepLink.s
    S3LogsBucketOwnerAccess.s
    S3LogsEncryptionDisabled.i
    S3LogsLocation.s
    S3LogsStatus.s
    S3LogsArn.s
    logsStreamName.s
    NetworkInterfaceId.s
    SubnetId.s
    projectName.s
    queuedTimeoutInMinutes.i
    resolvedSourceVersion.s
    serviceRole.s
    Resource.s
    AuthType.s
    Buildspec.s
    Context.s
    TargetUrl.s
    GitCloneDepth.i
    FetchSubmodules.i
    InsecureSsl.i
    sourceLocation.s
    ReportBuildStatus.i
    SourceIdentifier.s
    sourceType.s
    sourceVersion.s
    startTime.i
    timeoutInMinutes.i
    VpcId.s
    j.i
    count_j.i
    strVal.s
    name.s
    v_type.s
    value.s
    identifier.s
    location.s
    mountOptions.s
    mountPoint.s
    durationInSeconds.i
    phaseStatus.s
    phaseType.s
    k.i
    count_k.i
    message.s
    statusCode.s
    artifactIdentifier.s
    bucketOwnerAccess.s
    encryptionDisabled.i
    md5sum.s
    overrideArtifactName.i
    sha256sum.s
    authResource.s
    authType.s
    buildspec.s
    buildStatusConfigContext.s
    buildStatusConfigTargetUrl.s
    gitCloneDepth.i
    gitSubmodulesConfigFetchSubmodules.i
    insecureSsl.i
    reportBuildStatus.i
    sourceIdentifier.s

    i.i = 0
    count_i.i = CkJsonObject::ckSizeOfArray(jResp,"builds")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        arn = CkJsonObject::ckStringOf(jResp,"builds[i].arn")
        ArtifactIdentifier = CkJsonObject::ckStringOf(jResp,"builds[i].artifacts.artifactIdentifier")
        BucketOwnerAccess = CkJsonObject::ckStringOf(jResp,"builds[i].artifacts.bucketOwnerAccess")
        EncryptionDisabled = CkJsonObject::ckIntOf(jResp,"builds[i].artifacts.encryptionDisabled")
        Location = CkJsonObject::ckStringOf(jResp,"builds[i].artifacts.location")
        Md5sum = CkJsonObject::ckStringOf(jResp,"builds[i].artifacts.md5sum")
        OverrideArtifactName = CkJsonObject::ckIntOf(jResp,"builds[i].artifacts.overrideArtifactName")
        Sha256sum = CkJsonObject::ckStringOf(jResp,"builds[i].artifacts.sha256sum")
        buildBatchArn = CkJsonObject::ckStringOf(jResp,"builds[i].buildBatchArn")
        buildComplete = CkJsonObject::ckIntOf(jResp,"builds[i].buildComplete")
        buildNumber = CkJsonObject::ckIntOf(jResp,"builds[i].buildNumber")
        buildStatus = CkJsonObject::ckStringOf(jResp,"builds[i].buildStatus")
        cacheLocation = CkJsonObject::ckStringOf(jResp,"builds[i].cache.location")
        v_Type = CkJsonObject::ckStringOf(jResp,"builds[i].cache.type")
        currentPhase = CkJsonObject::ckStringOf(jResp,"builds[i].currentPhase")
        SessionEnabled = CkJsonObject::ckIntOf(jResp,"builds[i].debugSession.sessionEnabled")
        SessionTarget = CkJsonObject::ckStringOf(jResp,"builds[i].debugSession.sessionTarget")
        encryptionKey = CkJsonObject::ckStringOf(jResp,"builds[i].encryptionKey")
        endTime = CkJsonObject::ckIntOf(jResp,"builds[i].endTime")
        Certificate = CkJsonObject::ckStringOf(jResp,"builds[i].environment.certificate")
        ComputeType = CkJsonObject::ckStringOf(jResp,"builds[i].environment.computeType")
        Image = CkJsonObject::ckStringOf(jResp,"builds[i].environment.image")
        ImagePullCredentialsType = CkJsonObject::ckStringOf(jResp,"builds[i].environment.imagePullCredentialsType")
        PrivilegedMode = CkJsonObject::ckIntOf(jResp,"builds[i].environment.privilegedMode")
        Credential = CkJsonObject::ckStringOf(jResp,"builds[i].environment.registryCredential.credential")
        CredentialProvider = CkJsonObject::ckStringOf(jResp,"builds[i].environment.registryCredential.credentialProvider")
        environmentType = CkJsonObject::ckStringOf(jResp,"builds[i].environment.type")
        id = CkJsonObject::ckStringOf(jResp,"builds[i].id")
        initiator = CkJsonObject::ckStringOf(jResp,"builds[i].initiator")
        GroupName = CkJsonObject::ckStringOf(jResp,"builds[i].logs.cloudWatchLogs.groupName")
        Status = CkJsonObject::ckStringOf(jResp,"builds[i].logs.cloudWatchLogs.status")
        StreamName = CkJsonObject::ckStringOf(jResp,"builds[i].logs.cloudWatchLogs.streamName")
        CloudWatchLogsArn = CkJsonObject::ckStringOf(jResp,"builds[i].logs.cloudWatchLogsArn")
        DeepLink = CkJsonObject::ckStringOf(jResp,"builds[i].logs.deepLink")
        logsGroupName = CkJsonObject::ckStringOf(jResp,"builds[i].logs.groupName")
        S3DeepLink = CkJsonObject::ckStringOf(jResp,"builds[i].logs.s3DeepLink")
        S3LogsBucketOwnerAccess = CkJsonObject::ckStringOf(jResp,"builds[i].logs.s3Logs.bucketOwnerAccess")
        S3LogsEncryptionDisabled = CkJsonObject::ckIntOf(jResp,"builds[i].logs.s3Logs.encryptionDisabled")
        S3LogsLocation = CkJsonObject::ckStringOf(jResp,"builds[i].logs.s3Logs.location")
        S3LogsStatus = CkJsonObject::ckStringOf(jResp,"builds[i].logs.s3Logs.status")
        S3LogsArn = CkJsonObject::ckStringOf(jResp,"builds[i].logs.s3LogsArn")
        logsStreamName = CkJsonObject::ckStringOf(jResp,"builds[i].logs.streamName")
        NetworkInterfaceId = CkJsonObject::ckStringOf(jResp,"builds[i].networkInterface.networkInterfaceId")
        SubnetId = CkJsonObject::ckStringOf(jResp,"builds[i].networkInterface.subnetId")
        projectName = CkJsonObject::ckStringOf(jResp,"builds[i].projectName")
        queuedTimeoutInMinutes = CkJsonObject::ckIntOf(jResp,"builds[i].queuedTimeoutInMinutes")
        resolvedSourceVersion = CkJsonObject::ckStringOf(jResp,"builds[i].resolvedSourceVersion")
        serviceRole = CkJsonObject::ckStringOf(jResp,"builds[i].serviceRole")
        Resource = CkJsonObject::ckStringOf(jResp,"builds[i].source.auth.resource")
        AuthType = CkJsonObject::ckStringOf(jResp,"builds[i].source.auth.type")
        Buildspec = CkJsonObject::ckStringOf(jResp,"builds[i].source.buildspec")
        Context = CkJsonObject::ckStringOf(jResp,"builds[i].source.buildStatusConfig.context")
        TargetUrl = CkJsonObject::ckStringOf(jResp,"builds[i].source.buildStatusConfig.targetUrl")
        GitCloneDepth = CkJsonObject::ckIntOf(jResp,"builds[i].source.gitCloneDepth")
        FetchSubmodules = CkJsonObject::ckIntOf(jResp,"builds[i].source.gitSubmodulesConfig.fetchSubmodules")
        InsecureSsl = CkJsonObject::ckIntOf(jResp,"builds[i].source.insecureSsl")
        sourceLocation = CkJsonObject::ckStringOf(jResp,"builds[i].source.location")
        ReportBuildStatus = CkJsonObject::ckIntOf(jResp,"builds[i].source.reportBuildStatus")
        SourceIdentifier = CkJsonObject::ckStringOf(jResp,"builds[i].source.sourceIdentifier")
        sourceType = CkJsonObject::ckStringOf(jResp,"builds[i].source.type")
        sourceVersion = CkJsonObject::ckStringOf(jResp,"builds[i].sourceVersion")
        startTime = CkJsonObject::ckIntOf(jResp,"builds[i].startTime")
        timeoutInMinutes = CkJsonObject::ckIntOf(jResp,"builds[i].timeoutInMinutes")
        VpcId = CkJsonObject::ckStringOf(jResp,"builds[i].vpcConfig.vpcId")
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"builds[i].cache.modes")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"builds[i].cache.modes[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"builds[i].environment.environmentVariables")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            name = CkJsonObject::ckStringOf(jResp,"builds[i].environment.environmentVariables[j].name")
            v_type = CkJsonObject::ckStringOf(jResp,"builds[i].environment.environmentVariables[j].type")
            value = CkJsonObject::ckStringOf(jResp,"builds[i].environment.environmentVariables[j].value")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"builds[i].exportedEnvironmentVariables")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            name = CkJsonObject::ckStringOf(jResp,"builds[i].exportedEnvironmentVariables[j].name")
            value = CkJsonObject::ckStringOf(jResp,"builds[i].exportedEnvironmentVariables[j].value")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"builds[i].fileSystemLocations")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            identifier = CkJsonObject::ckStringOf(jResp,"builds[i].fileSystemLocations[j].identifier")
            location = CkJsonObject::ckStringOf(jResp,"builds[i].fileSystemLocations[j].location")
            mountOptions = CkJsonObject::ckStringOf(jResp,"builds[i].fileSystemLocations[j].mountOptions")
            mountPoint = CkJsonObject::ckStringOf(jResp,"builds[i].fileSystemLocations[j].mountPoint")
            v_type = CkJsonObject::ckStringOf(jResp,"builds[i].fileSystemLocations[j].type")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"builds[i].phases")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            durationInSeconds = CkJsonObject::ckIntOf(jResp,"builds[i].phases[j].durationInSeconds")
            endTime = CkJsonObject::ckIntOf(jResp,"builds[i].phases[j].endTime")
            phaseStatus = CkJsonObject::ckStringOf(jResp,"builds[i].phases[j].phaseStatus")
            phaseType = CkJsonObject::ckStringOf(jResp,"builds[i].phases[j].phaseType")
            startTime = CkJsonObject::ckIntOf(jResp,"builds[i].phases[j].startTime")
            k = 0
            count_k = CkJsonObject::ckSizeOfArray(jResp,"builds[i].phases[j].contexts")
            While k < count_k
                CkJsonObject::setCkK(jResp, k)
                message = CkJsonObject::ckStringOf(jResp,"builds[i].phases[j].contexts[k].message")
                statusCode = CkJsonObject::ckStringOf(jResp,"builds[i].phases[j].contexts[k].statusCode")
                k = k + 1
            Wend
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"builds[i].reportArns")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"builds[i].reportArns[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"builds[i].secondaryArtifacts")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            artifactIdentifier = CkJsonObject::ckStringOf(jResp,"builds[i].secondaryArtifacts[j].artifactIdentifier")
            bucketOwnerAccess = CkJsonObject::ckStringOf(jResp,"builds[i].secondaryArtifacts[j].bucketOwnerAccess")
            encryptionDisabled = CkJsonObject::ckIntOf(jResp,"builds[i].secondaryArtifacts[j].encryptionDisabled")
            location = CkJsonObject::ckStringOf(jResp,"builds[i].secondaryArtifacts[j].location")
            md5sum = CkJsonObject::ckStringOf(jResp,"builds[i].secondaryArtifacts[j].md5sum")
            overrideArtifactName = CkJsonObject::ckIntOf(jResp,"builds[i].secondaryArtifacts[j].overrideArtifactName")
            sha256sum = CkJsonObject::ckStringOf(jResp,"builds[i].secondaryArtifacts[j].sha256sum")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"builds[i].secondarySources")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            authResource = CkJsonObject::ckStringOf(jResp,"builds[i].secondarySources[j].auth.resource")
            authType = CkJsonObject::ckStringOf(jResp,"builds[i].secondarySources[j].auth.type")
            buildspec = CkJsonObject::ckStringOf(jResp,"builds[i].secondarySources[j].buildspec")
            buildStatusConfigContext = CkJsonObject::ckStringOf(jResp,"builds[i].secondarySources[j].buildStatusConfig.context")
            buildStatusConfigTargetUrl = CkJsonObject::ckStringOf(jResp,"builds[i].secondarySources[j].buildStatusConfig.targetUrl")
            gitCloneDepth = CkJsonObject::ckIntOf(jResp,"builds[i].secondarySources[j].gitCloneDepth")
            gitSubmodulesConfigFetchSubmodules = CkJsonObject::ckIntOf(jResp,"builds[i].secondarySources[j].gitSubmodulesConfig.fetchSubmodules")
            insecureSsl = CkJsonObject::ckIntOf(jResp,"builds[i].secondarySources[j].insecureSsl")
            location = CkJsonObject::ckStringOf(jResp,"builds[i].secondarySources[j].location")
            reportBuildStatus = CkJsonObject::ckIntOf(jResp,"builds[i].secondarySources[j].reportBuildStatus")
            sourceIdentifier = CkJsonObject::ckStringOf(jResp,"builds[i].secondarySources[j].sourceIdentifier")
            v_type = CkJsonObject::ckStringOf(jResp,"builds[i].secondarySources[j].type")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"builds[i].secondarySourceVersions")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            sourceIdentifier = CkJsonObject::ckStringOf(jResp,"builds[i].secondarySourceVersions[j].sourceIdentifier")
            sourceVersion = CkJsonObject::ckStringOf(jResp,"builds[i].secondarySourceVersions[j].sourceVersion")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"builds[i].vpcConfig.securityGroupIds")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"builds[i].vpcConfig.securityGroupIds[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"builds[i].vpcConfig.subnets")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"builds[i].vpcConfig.subnets[j]")
            j = j + 1
        Wend
        i = i + 1
    Wend
    i = 0
    count_i = CkJsonObject::ckSizeOfArray(jResp,"buildsNotFound")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        strVal = CkJsonObject::ckStringOf(jResp,"buildsNotFound[i]")
        i = i + 1
    Wend

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

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


    CkRest::ckDispose(rest)
    CkAuthAws::ckDispose(authAws)
    CkJsonObject::ckDispose(json)
    CkStringBuilder::ckDispose(sbRequestBody)
    CkStringBuilder::ckDispose(sbResponseBody)
    CkJsonObject::ckDispose(jResp)


    ProcedureReturn
EndProcedure