Chilkat Online Tools

BatchGetProjects 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,"names[0]","string")

    ; The JSON request body created by the above code:

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

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

    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
    Name.s
    NamespaceType.s
    OverrideArtifactName.i
    Packaging.s
    Path.s
    v_Type.s
    BadgeEnabled.i
    BadgeRequestUrl.s
    BatchReportMode.s
    CombineArtifacts.i
    MaximumBuildsAllowed.i
    ServiceRole.s
    TimeoutInMins.i
    cacheLocation.s
    cacheType.s
    concurrentBuildLimit.i
    created.i
    description.s
    encryptionKey.s
    Certificate.s
    ComputeType.s
    Image.s
    ImagePullCredentialsType.s
    PrivilegedMode.i
    Credential.s
    CredentialProvider.s
    environmentType.s
    lastModified.i
    GroupName.s
    Status.s
    StreamName.s
    S3LogsBucketOwnerAccess.s
    S3LogsEncryptionDisabled.i
    S3LogsLocation.s
    S3LogsStatus.s
    name.s
    projectVisibility.s
    publicProjectAlias.s
    queuedTimeoutInMinutes.i
    resourceAccessRole.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
    timeoutInMinutes.i
    VpcId.s
    BranchFilter.s
    BuildType.s
    LastModifiedSecret.i
    PayloadUrl.s
    Secret.s
    v_Url.s
    j.i
    count_j.i
    strVal.s
    v_type.s
    value.s
    identifier.s
    location.s
    mountOptions.s
    mountPoint.s
    artifactIdentifier.s
    bucketOwnerAccess.s
    encryptionDisabled.i
    namespaceType.s
    overrideArtifactName.i
    packaging.s
    path.s
    authResource.s
    authType.s
    buildspec.s
    buildStatusConfigContext.s
    buildStatusConfigTargetUrl.s
    gitCloneDepth.i
    gitSubmodulesConfigFetchSubmodules.i
    insecureSsl.i
    reportBuildStatus.i
    sourceIdentifier.s
    key.s
    k.i
    count_k.i
    excludeMatchedPattern.i
    pattern.s

    i.i = 0
    count_i.i = CkJsonObject::ckSizeOfArray(jResp,"projects")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        arn = CkJsonObject::ckStringOf(jResp,"projects[i].arn")
        ArtifactIdentifier = CkJsonObject::ckStringOf(jResp,"projects[i].artifacts.artifactIdentifier")
        BucketOwnerAccess = CkJsonObject::ckStringOf(jResp,"projects[i].artifacts.bucketOwnerAccess")
        EncryptionDisabled = CkJsonObject::ckIntOf(jResp,"projects[i].artifacts.encryptionDisabled")
        Location = CkJsonObject::ckStringOf(jResp,"projects[i].artifacts.location")
        Name = CkJsonObject::ckStringOf(jResp,"projects[i].artifacts.name")
        NamespaceType = CkJsonObject::ckStringOf(jResp,"projects[i].artifacts.namespaceType")
        OverrideArtifactName = CkJsonObject::ckIntOf(jResp,"projects[i].artifacts.overrideArtifactName")
        Packaging = CkJsonObject::ckStringOf(jResp,"projects[i].artifacts.packaging")
        Path = CkJsonObject::ckStringOf(jResp,"projects[i].artifacts.path")
        v_Type = CkJsonObject::ckStringOf(jResp,"projects[i].artifacts.type")
        BadgeEnabled = CkJsonObject::ckIntOf(jResp,"projects[i].badge.badgeEnabled")
        BadgeRequestUrl = CkJsonObject::ckStringOf(jResp,"projects[i].badge.badgeRequestUrl")
        BatchReportMode = CkJsonObject::ckStringOf(jResp,"projects[i].buildBatchConfig.batchReportMode")
        CombineArtifacts = CkJsonObject::ckIntOf(jResp,"projects[i].buildBatchConfig.combineArtifacts")
        MaximumBuildsAllowed = CkJsonObject::ckIntOf(jResp,"projects[i].buildBatchConfig.restrictions.maximumBuildsAllowed")
        ServiceRole = CkJsonObject::ckStringOf(jResp,"projects[i].buildBatchConfig.serviceRole")
        TimeoutInMins = CkJsonObject::ckIntOf(jResp,"projects[i].buildBatchConfig.timeoutInMins")
        cacheLocation = CkJsonObject::ckStringOf(jResp,"projects[i].cache.location")
        cacheType = CkJsonObject::ckStringOf(jResp,"projects[i].cache.type")
        concurrentBuildLimit = CkJsonObject::ckIntOf(jResp,"projects[i].concurrentBuildLimit")
        created = CkJsonObject::ckIntOf(jResp,"projects[i].created")
        description = CkJsonObject::ckStringOf(jResp,"projects[i].description")
        encryptionKey = CkJsonObject::ckStringOf(jResp,"projects[i].encryptionKey")
        Certificate = CkJsonObject::ckStringOf(jResp,"projects[i].environment.certificate")
        ComputeType = CkJsonObject::ckStringOf(jResp,"projects[i].environment.computeType")
        Image = CkJsonObject::ckStringOf(jResp,"projects[i].environment.image")
        ImagePullCredentialsType = CkJsonObject::ckStringOf(jResp,"projects[i].environment.imagePullCredentialsType")
        PrivilegedMode = CkJsonObject::ckIntOf(jResp,"projects[i].environment.privilegedMode")
        Credential = CkJsonObject::ckStringOf(jResp,"projects[i].environment.registryCredential.credential")
        CredentialProvider = CkJsonObject::ckStringOf(jResp,"projects[i].environment.registryCredential.credentialProvider")
        environmentType = CkJsonObject::ckStringOf(jResp,"projects[i].environment.type")
        lastModified = CkJsonObject::ckIntOf(jResp,"projects[i].lastModified")
        GroupName = CkJsonObject::ckStringOf(jResp,"projects[i].logsConfig.cloudWatchLogs.groupName")
        Status = CkJsonObject::ckStringOf(jResp,"projects[i].logsConfig.cloudWatchLogs.status")
        StreamName = CkJsonObject::ckStringOf(jResp,"projects[i].logsConfig.cloudWatchLogs.streamName")
        S3LogsBucketOwnerAccess = CkJsonObject::ckStringOf(jResp,"projects[i].logsConfig.s3Logs.bucketOwnerAccess")
        S3LogsEncryptionDisabled = CkJsonObject::ckIntOf(jResp,"projects[i].logsConfig.s3Logs.encryptionDisabled")
        S3LogsLocation = CkJsonObject::ckStringOf(jResp,"projects[i].logsConfig.s3Logs.location")
        S3LogsStatus = CkJsonObject::ckStringOf(jResp,"projects[i].logsConfig.s3Logs.status")
        name = CkJsonObject::ckStringOf(jResp,"projects[i].name")
        projectVisibility = CkJsonObject::ckStringOf(jResp,"projects[i].projectVisibility")
        publicProjectAlias = CkJsonObject::ckStringOf(jResp,"projects[i].publicProjectAlias")
        queuedTimeoutInMinutes = CkJsonObject::ckIntOf(jResp,"projects[i].queuedTimeoutInMinutes")
        resourceAccessRole = CkJsonObject::ckStringOf(jResp,"projects[i].resourceAccessRole")
        serviceRole = CkJsonObject::ckStringOf(jResp,"projects[i].serviceRole")
        Resource = CkJsonObject::ckStringOf(jResp,"projects[i].source.auth.resource")
        AuthType = CkJsonObject::ckStringOf(jResp,"projects[i].source.auth.type")
        Buildspec = CkJsonObject::ckStringOf(jResp,"projects[i].source.buildspec")
        Context = CkJsonObject::ckStringOf(jResp,"projects[i].source.buildStatusConfig.context")
        TargetUrl = CkJsonObject::ckStringOf(jResp,"projects[i].source.buildStatusConfig.targetUrl")
        GitCloneDepth = CkJsonObject::ckIntOf(jResp,"projects[i].source.gitCloneDepth")
        FetchSubmodules = CkJsonObject::ckIntOf(jResp,"projects[i].source.gitSubmodulesConfig.fetchSubmodules")
        InsecureSsl = CkJsonObject::ckIntOf(jResp,"projects[i].source.insecureSsl")
        sourceLocation = CkJsonObject::ckStringOf(jResp,"projects[i].source.location")
        ReportBuildStatus = CkJsonObject::ckIntOf(jResp,"projects[i].source.reportBuildStatus")
        SourceIdentifier = CkJsonObject::ckStringOf(jResp,"projects[i].source.sourceIdentifier")
        sourceType = CkJsonObject::ckStringOf(jResp,"projects[i].source.type")
        sourceVersion = CkJsonObject::ckStringOf(jResp,"projects[i].sourceVersion")
        timeoutInMinutes = CkJsonObject::ckIntOf(jResp,"projects[i].timeoutInMinutes")
        VpcId = CkJsonObject::ckStringOf(jResp,"projects[i].vpcConfig.vpcId")
        BranchFilter = CkJsonObject::ckStringOf(jResp,"projects[i].webhook.branchFilter")
        BuildType = CkJsonObject::ckStringOf(jResp,"projects[i].webhook.buildType")
        LastModifiedSecret = CkJsonObject::ckIntOf(jResp,"projects[i].webhook.lastModifiedSecret")
        PayloadUrl = CkJsonObject::ckStringOf(jResp,"projects[i].webhook.payloadUrl")
        Secret = CkJsonObject::ckStringOf(jResp,"projects[i].webhook.secret")
        v_Url = CkJsonObject::ckStringOf(jResp,"projects[i].webhook.url")
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"projects[i].buildBatchConfig.restrictions.computeTypesAllowed")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"projects[i].buildBatchConfig.restrictions.computeTypesAllowed[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"projects[i].cache.modes")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"projects[i].cache.modes[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"projects[i].environment.environmentVariables")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            name = CkJsonObject::ckStringOf(jResp,"projects[i].environment.environmentVariables[j].name")
            v_type = CkJsonObject::ckStringOf(jResp,"projects[i].environment.environmentVariables[j].type")
            value = CkJsonObject::ckStringOf(jResp,"projects[i].environment.environmentVariables[j].value")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"projects[i].fileSystemLocations")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            identifier = CkJsonObject::ckStringOf(jResp,"projects[i].fileSystemLocations[j].identifier")
            location = CkJsonObject::ckStringOf(jResp,"projects[i].fileSystemLocations[j].location")
            mountOptions = CkJsonObject::ckStringOf(jResp,"projects[i].fileSystemLocations[j].mountOptions")
            mountPoint = CkJsonObject::ckStringOf(jResp,"projects[i].fileSystemLocations[j].mountPoint")
            v_type = CkJsonObject::ckStringOf(jResp,"projects[i].fileSystemLocations[j].type")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"projects[i].secondaryArtifacts")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            artifactIdentifier = CkJsonObject::ckStringOf(jResp,"projects[i].secondaryArtifacts[j].artifactIdentifier")
            bucketOwnerAccess = CkJsonObject::ckStringOf(jResp,"projects[i].secondaryArtifacts[j].bucketOwnerAccess")
            encryptionDisabled = CkJsonObject::ckIntOf(jResp,"projects[i].secondaryArtifacts[j].encryptionDisabled")
            location = CkJsonObject::ckStringOf(jResp,"projects[i].secondaryArtifacts[j].location")
            name = CkJsonObject::ckStringOf(jResp,"projects[i].secondaryArtifacts[j].name")
            namespaceType = CkJsonObject::ckStringOf(jResp,"projects[i].secondaryArtifacts[j].namespaceType")
            overrideArtifactName = CkJsonObject::ckIntOf(jResp,"projects[i].secondaryArtifacts[j].overrideArtifactName")
            packaging = CkJsonObject::ckStringOf(jResp,"projects[i].secondaryArtifacts[j].packaging")
            path = CkJsonObject::ckStringOf(jResp,"projects[i].secondaryArtifacts[j].path")
            v_type = CkJsonObject::ckStringOf(jResp,"projects[i].secondaryArtifacts[j].type")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"projects[i].secondarySources")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            authResource = CkJsonObject::ckStringOf(jResp,"projects[i].secondarySources[j].auth.resource")
            authType = CkJsonObject::ckStringOf(jResp,"projects[i].secondarySources[j].auth.type")
            buildspec = CkJsonObject::ckStringOf(jResp,"projects[i].secondarySources[j].buildspec")
            buildStatusConfigContext = CkJsonObject::ckStringOf(jResp,"projects[i].secondarySources[j].buildStatusConfig.context")
            buildStatusConfigTargetUrl = CkJsonObject::ckStringOf(jResp,"projects[i].secondarySources[j].buildStatusConfig.targetUrl")
            gitCloneDepth = CkJsonObject::ckIntOf(jResp,"projects[i].secondarySources[j].gitCloneDepth")
            gitSubmodulesConfigFetchSubmodules = CkJsonObject::ckIntOf(jResp,"projects[i].secondarySources[j].gitSubmodulesConfig.fetchSubmodules")
            insecureSsl = CkJsonObject::ckIntOf(jResp,"projects[i].secondarySources[j].insecureSsl")
            location = CkJsonObject::ckStringOf(jResp,"projects[i].secondarySources[j].location")
            reportBuildStatus = CkJsonObject::ckIntOf(jResp,"projects[i].secondarySources[j].reportBuildStatus")
            sourceIdentifier = CkJsonObject::ckStringOf(jResp,"projects[i].secondarySources[j].sourceIdentifier")
            v_type = CkJsonObject::ckStringOf(jResp,"projects[i].secondarySources[j].type")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"projects[i].secondarySourceVersions")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            sourceIdentifier = CkJsonObject::ckStringOf(jResp,"projects[i].secondarySourceVersions[j].sourceIdentifier")
            sourceVersion = CkJsonObject::ckStringOf(jResp,"projects[i].secondarySourceVersions[j].sourceVersion")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"projects[i].tags")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            key = CkJsonObject::ckStringOf(jResp,"projects[i].tags[j].key")
            value = CkJsonObject::ckStringOf(jResp,"projects[i].tags[j].value")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"projects[i].vpcConfig.securityGroupIds")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"projects[i].vpcConfig.securityGroupIds[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"projects[i].vpcConfig.subnets")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"projects[i].vpcConfig.subnets[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"projects[i].webhook.filterGroups")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            k = 0
            count_k = CkJsonObject::ckSizeOfArray(jResp,"projects[i].webhook.filterGroups[j]")
            While k < count_k
                CkJsonObject::setCkK(jResp, k)
                excludeMatchedPattern = CkJsonObject::ckIntOf(jResp,"projects[i].webhook.filterGroups[j][k].excludeMatchedPattern")
                pattern = CkJsonObject::ckStringOf(jResp,"projects[i].webhook.filterGroups[j][k].pattern")
                v_type = CkJsonObject::ckStringOf(jResp,"projects[i].webhook.filterGroups[j][k].type")
                k = k + 1
            Wend
            j = j + 1
        Wend
        i = i + 1
    Wend
    i = 0
    count_i = CkJsonObject::ckSizeOfArray(jResp,"projectsNotFound")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        strVal = CkJsonObject::ckStringOf(jResp,"projectsNotFound[i]")
        i = i + 1
    Wend

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

    ; {
    ;   "projects": [
    ;     {
    ;       "arn": "string",
    ;       "artifacts": {
    ;         "artifactIdentifier": "string",
    ;         "bucketOwnerAccess": "string",
    ;         "encryptionDisabled": boolean,
    ;         "location": "string",
    ;         "name": "string",
    ;         "namespaceType": "string",
    ;         "overrideArtifactName": boolean,
    ;         "packaging": "string",
    ;         "path": "string",
    ;         "type": "string"
    ;       },
    ;       "badge": {
    ;         "badgeEnabled": boolean,
    ;         "badgeRequestUrl": "string"
    ;       },
    ;       "buildBatchConfig": {
    ;         "batchReportMode": "string",
    ;         "combineArtifacts": boolean,
    ;         "restrictions": {
    ;           "computeTypesAllowed": [
    ;             "string"
    ;           ],
    ;           "maximumBuildsAllowed": number
    ;         },
    ;         "serviceRole": "string",
    ;         "timeoutInMins": number
    ;       },
    ;       "cache": {
    ;         "location": "string",
    ;         "modes": [
    ;           "string"
    ;         ],
    ;         "type": "string"
    ;       },
    ;       "concurrentBuildLimit": number,
    ;       "created": number,
    ;       "description": "string",
    ;       "encryptionKey": "string",
    ;       "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"
    ;         }
    ;       ],
    ;       "lastModified": number,
    ;       "logsConfig": {
    ;         "cloudWatchLogs": {
    ;           "groupName": "string",
    ;           "status": "string",
    ;           "streamName": "string"
    ;         },
    ;         "s3Logs": {
    ;           "bucketOwnerAccess": "string",
    ;           "encryptionDisabled": boolean,
    ;           "location": "string",
    ;           "status": "string"
    ;         }
    ;       },
    ;       "name": "string",
    ;       "projectVisibility": "string",
    ;       "publicProjectAlias": "string",
    ;       "queuedTimeoutInMinutes": number,
    ;       "resourceAccessRole": "string",
    ;       "secondaryArtifacts": [
    ;         {
    ;           "artifactIdentifier": "string",
    ;           "bucketOwnerAccess": "string",
    ;           "encryptionDisabled": boolean,
    ;           "location": "string",
    ;           "name": "string",
    ;           "namespaceType": "string",
    ;           "overrideArtifactName": boolean,
    ;           "packaging": "string",
    ;           "path": "string",
    ;           "type": "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",
    ;       "tags": [
    ;         {
    ;           "key": "string",
    ;           "value": "string"
    ;         }
    ;       ],
    ;       "timeoutInMinutes": number,
    ;       "vpcConfig": {
    ;         "securityGroupIds": [
    ;           "string"
    ;         ],
    ;         "subnets": [
    ;           "string"
    ;         ],
    ;         "vpcId": "string"
    ;       },
    ;       "webhook": {
    ;         "branchFilter": "string",
    ;         "buildType": "string",
    ;         "filterGroups": [
    ;           [
    ;             {
    ;               "excludeMatchedPattern": boolean,
    ;               "pattern": "string",
    ;               "type": "string"
    ;             }
    ;           ]
    ;         ],
    ;         "lastModifiedSecret": number,
    ;         "payloadUrl": "string",
    ;         "secret": "string",
    ;         "url": "string"
    ;       }
    ;     }
    ;   ],
    ;   "projectsNotFound": [
    ;     "string"
    ;   ]
    ; }


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


    ProcedureReturn
EndProcedure