Chilkat Online Tools

RetryBuild unicodeC Example

AWS CodeBuild

#include <C_CkRestW.h>
#include <C_CkAuthAwsW.h>
#include <C_CkJsonObjectW.h>
#include <C_CkStringBuilderW.h>

void ChilkatSample(void)
    {
    HCkRestW rest;
    BOOL success;
    HCkAuthAwsW authAws;
    HCkJsonObjectW json;
    HCkStringBuilderW sbRequestBody;
    HCkStringBuilderW sbResponseBody;
    int respStatusCode;
    HCkJsonObjectW jResp;
    const wchar_t *strVal;
    const wchar_t *name;
    const wchar_t *v_type;
    const wchar_t *value;
    const wchar_t *identifier;
    const wchar_t *location;
    const wchar_t *mountOptions;
    const wchar_t *mountPoint;
    int durationInSeconds;
    int endTime;
    const wchar_t *phaseStatus;
    const wchar_t *phaseType;
    int startTime;
    int j;
    int count_j;
    const wchar_t *message;
    const wchar_t *statusCode;
    const wchar_t *artifactIdentifier;
    const wchar_t *bucketOwnerAccess;
    int encryptionDisabled;
    const wchar_t *md5sum;
    int overrideArtifactName;
    const wchar_t *sha256sum;
    const wchar_t *authResource;
    const wchar_t *authType;
    const wchar_t *buildspec;
    const wchar_t *buildStatusConfigContext;
    const wchar_t *buildStatusConfigTargetUrl;
    int gitCloneDepth;
    int gitSubmodulesConfigFetchSubmodules;
    int insecureSsl;
    int reportBuildStatus;
    const wchar_t *sourceIdentifier;
    const wchar_t *sourceVersion;
    const wchar_t *Arn;
    const wchar_t *ArtifactIdentifier;
    const wchar_t *BucketOwnerAccess;
    int EncryptionDisabled;
    const wchar_t *Location;
    const wchar_t *Md5sum;
    int OverrideArtifactName;
    const wchar_t *Sha256sum;
    const wchar_t *BuildBatchArn;
    int BuildComplete;
    int BuildNumber;
    const wchar_t *BuildStatus;
    const wchar_t *CacheLocation;
    const wchar_t *v_Type;
    const wchar_t *CurrentPhase;
    int SessionEnabled;
    const wchar_t *SessionTarget;
    const wchar_t *EncryptionKey;
    int EndTime;
    const wchar_t *Certificate;
    const wchar_t *ComputeType;
    const wchar_t *Image;
    const wchar_t *ImagePullCredentialsType;
    int PrivilegedMode;
    const wchar_t *Credential;
    const wchar_t *CredentialProvider;
    const wchar_t *EnvironmentType;
    const wchar_t *Id;
    const wchar_t *Initiator;
    const wchar_t *GroupName;
    const wchar_t *Status;
    const wchar_t *StreamName;
    const wchar_t *CloudWatchLogsArn;
    const wchar_t *DeepLink;
    const wchar_t *LogsGroupName;
    const wchar_t *S3DeepLink;
    const wchar_t *S3LogsBucketOwnerAccess;
    int S3LogsEncryptionDisabled;
    const wchar_t *S3LogsLocation;
    const wchar_t *S3LogsStatus;
    const wchar_t *S3LogsArn;
    const wchar_t *LogsStreamName;
    const wchar_t *NetworkInterfaceId;
    const wchar_t *SubnetId;
    const wchar_t *ProjectName;
    int QueuedTimeoutInMinutes;
    const wchar_t *ResolvedSourceVersion;
    const wchar_t *ServiceRole;
    const wchar_t *Resource;
    const wchar_t *AuthType;
    const wchar_t *Buildspec;
    const wchar_t *Context;
    const wchar_t *TargetUrl;
    int GitCloneDepth;
    int FetchSubmodules;
    int InsecureSsl;
    const wchar_t *SourceLocation;
    int ReportBuildStatus;
    const wchar_t *SourceIdentifier;
    const wchar_t *SourceType;
    const wchar_t *SourceVersion;
    int StartTime;
    int TimeoutInMinutes;
    const wchar_t *VpcId;
    int i;
    int count_i;

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

    rest = CkRestW_Create();

    authAws = CkAuthAwsW_Create();
    CkAuthAwsW_putAccessKey(authAws,L"AWS_ACCESS_KEY");
    CkAuthAwsW_putSecretKey(authAws,L"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.)
    CkAuthAwsW_putRegion(authAws,L"us-west-2");
    CkAuthAwsW_putServiceName(authAws,L"codebuild");
    // SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
    CkRestW_SetAuthAws(rest,authAws);

    // URL: https://codebuild.us-west-2.amazonaws.com/
    // Use the same region as specified above.
    success = CkRestW_Connect(rest,L"codebuild.us-west-2.amazonaws.com",443,TRUE,TRUE);
    if (success != TRUE) {
        wprintf(L"ConnectFailReason: %d\n",CkRestW_getConnectFailReason(rest));
        wprintf(L"%s\n",CkRestW_lastErrorText(rest));
        CkRestW_Dispose(rest);
        CkAuthAwsW_Dispose(authAws);
        return;
    }

    // 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 = CkJsonObjectW_Create();
    CkJsonObjectW_UpdateString(json,L"id",L"string");
    CkJsonObjectW_UpdateString(json,L"idempotencyToken",L"string");

    // The JSON request body created by the above code:

    // {
    //   "id": "string",
    //   "idempotencyToken": "string"
    // }

    CkRestW_AddHeader(rest,L"Content-Type",L"application/x-amz-json-1.1");
    CkRestW_AddHeader(rest,L"X-Amz-Target",L"CodeBuild_20161006.RetryBuild");

    sbRequestBody = CkStringBuilderW_Create();
    CkJsonObjectW_EmitSb(json,sbRequestBody);
    sbResponseBody = CkStringBuilderW_Create();
    success = CkRestW_FullRequestSb(rest,L"POST",L"/",sbRequestBody,sbResponseBody);
    if (success != TRUE) {
        wprintf(L"%s\n",CkRestW_lastErrorText(rest));
        CkRestW_Dispose(rest);
        CkAuthAwsW_Dispose(authAws);
        CkJsonObjectW_Dispose(json);
        CkStringBuilderW_Dispose(sbRequestBody);
        CkStringBuilderW_Dispose(sbResponseBody);
        return;
    }

    respStatusCode = CkRestW_getResponseStatusCode(rest);
    wprintf(L"response status code = %d\n",respStatusCode);
    if (respStatusCode != 200) {
        wprintf(L"Response Header:\n");
        wprintf(L"%s\n",CkRestW_responseHeader(rest));
        wprintf(L"Response Body:\n");
        wprintf(L"%s\n",CkStringBuilderW_getAsString(sbResponseBody));
        CkRestW_Dispose(rest);
        CkAuthAwsW_Dispose(authAws);
        CkJsonObjectW_Dispose(json);
        CkStringBuilderW_Dispose(sbRequestBody);
        CkStringBuilderW_Dispose(sbResponseBody);
        return;
    }

    jResp = CkJsonObjectW_Create();
    CkJsonObjectW_LoadSb(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

    // Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.
    // See this example explaining how this memory should be used: const char * functions.

    Arn = CkJsonObjectW_stringOf(jResp,L"build.arn");
    ArtifactIdentifier = CkJsonObjectW_stringOf(jResp,L"build.artifacts.artifactIdentifier");
    BucketOwnerAccess = CkJsonObjectW_stringOf(jResp,L"build.artifacts.bucketOwnerAccess");
    EncryptionDisabled = CkJsonObjectW_IntOf(jResp,L"build.artifacts.encryptionDisabled");
    Location = CkJsonObjectW_stringOf(jResp,L"build.artifacts.location");
    Md5sum = CkJsonObjectW_stringOf(jResp,L"build.artifacts.md5sum");
    OverrideArtifactName = CkJsonObjectW_IntOf(jResp,L"build.artifacts.overrideArtifactName");
    Sha256sum = CkJsonObjectW_stringOf(jResp,L"build.artifacts.sha256sum");
    BuildBatchArn = CkJsonObjectW_stringOf(jResp,L"build.buildBatchArn");
    BuildComplete = CkJsonObjectW_IntOf(jResp,L"build.buildComplete");
    BuildNumber = CkJsonObjectW_IntOf(jResp,L"build.buildNumber");
    BuildStatus = CkJsonObjectW_stringOf(jResp,L"build.buildStatus");
    CacheLocation = CkJsonObjectW_stringOf(jResp,L"build.cache.location");
    v_Type = CkJsonObjectW_stringOf(jResp,L"build.cache.type");
    CurrentPhase = CkJsonObjectW_stringOf(jResp,L"build.currentPhase");
    SessionEnabled = CkJsonObjectW_IntOf(jResp,L"build.debugSession.sessionEnabled");
    SessionTarget = CkJsonObjectW_stringOf(jResp,L"build.debugSession.sessionTarget");
    EncryptionKey = CkJsonObjectW_stringOf(jResp,L"build.encryptionKey");
    EndTime = CkJsonObjectW_IntOf(jResp,L"build.endTime");
    Certificate = CkJsonObjectW_stringOf(jResp,L"build.environment.certificate");
    ComputeType = CkJsonObjectW_stringOf(jResp,L"build.environment.computeType");
    Image = CkJsonObjectW_stringOf(jResp,L"build.environment.image");
    ImagePullCredentialsType = CkJsonObjectW_stringOf(jResp,L"build.environment.imagePullCredentialsType");
    PrivilegedMode = CkJsonObjectW_IntOf(jResp,L"build.environment.privilegedMode");
    Credential = CkJsonObjectW_stringOf(jResp,L"build.environment.registryCredential.credential");
    CredentialProvider = CkJsonObjectW_stringOf(jResp,L"build.environment.registryCredential.credentialProvider");
    EnvironmentType = CkJsonObjectW_stringOf(jResp,L"build.environment.type");
    Id = CkJsonObjectW_stringOf(jResp,L"build.id");
    Initiator = CkJsonObjectW_stringOf(jResp,L"build.initiator");
    GroupName = CkJsonObjectW_stringOf(jResp,L"build.logs.cloudWatchLogs.groupName");
    Status = CkJsonObjectW_stringOf(jResp,L"build.logs.cloudWatchLogs.status");
    StreamName = CkJsonObjectW_stringOf(jResp,L"build.logs.cloudWatchLogs.streamName");
    CloudWatchLogsArn = CkJsonObjectW_stringOf(jResp,L"build.logs.cloudWatchLogsArn");
    DeepLink = CkJsonObjectW_stringOf(jResp,L"build.logs.deepLink");
    LogsGroupName = CkJsonObjectW_stringOf(jResp,L"build.logs.groupName");
    S3DeepLink = CkJsonObjectW_stringOf(jResp,L"build.logs.s3DeepLink");
    S3LogsBucketOwnerAccess = CkJsonObjectW_stringOf(jResp,L"build.logs.s3Logs.bucketOwnerAccess");
    S3LogsEncryptionDisabled = CkJsonObjectW_IntOf(jResp,L"build.logs.s3Logs.encryptionDisabled");
    S3LogsLocation = CkJsonObjectW_stringOf(jResp,L"build.logs.s3Logs.location");
    S3LogsStatus = CkJsonObjectW_stringOf(jResp,L"build.logs.s3Logs.status");
    S3LogsArn = CkJsonObjectW_stringOf(jResp,L"build.logs.s3LogsArn");
    LogsStreamName = CkJsonObjectW_stringOf(jResp,L"build.logs.streamName");
    NetworkInterfaceId = CkJsonObjectW_stringOf(jResp,L"build.networkInterface.networkInterfaceId");
    SubnetId = CkJsonObjectW_stringOf(jResp,L"build.networkInterface.subnetId");
    ProjectName = CkJsonObjectW_stringOf(jResp,L"build.projectName");
    QueuedTimeoutInMinutes = CkJsonObjectW_IntOf(jResp,L"build.queuedTimeoutInMinutes");
    ResolvedSourceVersion = CkJsonObjectW_stringOf(jResp,L"build.resolvedSourceVersion");
    ServiceRole = CkJsonObjectW_stringOf(jResp,L"build.serviceRole");
    Resource = CkJsonObjectW_stringOf(jResp,L"build.source.auth.resource");
    AuthType = CkJsonObjectW_stringOf(jResp,L"build.source.auth.type");
    Buildspec = CkJsonObjectW_stringOf(jResp,L"build.source.buildspec");
    Context = CkJsonObjectW_stringOf(jResp,L"build.source.buildStatusConfig.context");
    TargetUrl = CkJsonObjectW_stringOf(jResp,L"build.source.buildStatusConfig.targetUrl");
    GitCloneDepth = CkJsonObjectW_IntOf(jResp,L"build.source.gitCloneDepth");
    FetchSubmodules = CkJsonObjectW_IntOf(jResp,L"build.source.gitSubmodulesConfig.fetchSubmodules");
    InsecureSsl = CkJsonObjectW_IntOf(jResp,L"build.source.insecureSsl");
    SourceLocation = CkJsonObjectW_stringOf(jResp,L"build.source.location");
    ReportBuildStatus = CkJsonObjectW_IntOf(jResp,L"build.source.reportBuildStatus");
    SourceIdentifier = CkJsonObjectW_stringOf(jResp,L"build.source.sourceIdentifier");
    SourceType = CkJsonObjectW_stringOf(jResp,L"build.source.type");
    SourceVersion = CkJsonObjectW_stringOf(jResp,L"build.sourceVersion");
    StartTime = CkJsonObjectW_IntOf(jResp,L"build.startTime");
    TimeoutInMinutes = CkJsonObjectW_IntOf(jResp,L"build.timeoutInMinutes");
    VpcId = CkJsonObjectW_stringOf(jResp,L"build.vpcConfig.vpcId");
    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"build.cache.modes");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        strVal = CkJsonObjectW_stringOf(jResp,L"build.cache.modes[i]");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"build.environment.environmentVariables");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        name = CkJsonObjectW_stringOf(jResp,L"build.environment.environmentVariables[i].name");
        v_type = CkJsonObjectW_stringOf(jResp,L"build.environment.environmentVariables[i].type");
        value = CkJsonObjectW_stringOf(jResp,L"build.environment.environmentVariables[i].value");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"build.exportedEnvironmentVariables");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        name = CkJsonObjectW_stringOf(jResp,L"build.exportedEnvironmentVariables[i].name");
        value = CkJsonObjectW_stringOf(jResp,L"build.exportedEnvironmentVariables[i].value");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"build.fileSystemLocations");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        identifier = CkJsonObjectW_stringOf(jResp,L"build.fileSystemLocations[i].identifier");
        location = CkJsonObjectW_stringOf(jResp,L"build.fileSystemLocations[i].location");
        mountOptions = CkJsonObjectW_stringOf(jResp,L"build.fileSystemLocations[i].mountOptions");
        mountPoint = CkJsonObjectW_stringOf(jResp,L"build.fileSystemLocations[i].mountPoint");
        v_type = CkJsonObjectW_stringOf(jResp,L"build.fileSystemLocations[i].type");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"build.phases");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        durationInSeconds = CkJsonObjectW_IntOf(jResp,L"build.phases[i].durationInSeconds");
        endTime = CkJsonObjectW_IntOf(jResp,L"build.phases[i].endTime");
        phaseStatus = CkJsonObjectW_stringOf(jResp,L"build.phases[i].phaseStatus");
        phaseType = CkJsonObjectW_stringOf(jResp,L"build.phases[i].phaseType");
        startTime = CkJsonObjectW_IntOf(jResp,L"build.phases[i].startTime");
        j = 0;
        count_j = CkJsonObjectW_SizeOfArray(jResp,L"build.phases[i].contexts");
        while (j < count_j) {
            CkJsonObjectW_putJ(jResp,j);
            message = CkJsonObjectW_stringOf(jResp,L"build.phases[i].contexts[j].message");
            statusCode = CkJsonObjectW_stringOf(jResp,L"build.phases[i].contexts[j].statusCode");
            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"build.reportArns");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        strVal = CkJsonObjectW_stringOf(jResp,L"build.reportArns[i]");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"build.secondaryArtifacts");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        artifactIdentifier = CkJsonObjectW_stringOf(jResp,L"build.secondaryArtifacts[i].artifactIdentifier");
        bucketOwnerAccess = CkJsonObjectW_stringOf(jResp,L"build.secondaryArtifacts[i].bucketOwnerAccess");
        encryptionDisabled = CkJsonObjectW_IntOf(jResp,L"build.secondaryArtifacts[i].encryptionDisabled");
        location = CkJsonObjectW_stringOf(jResp,L"build.secondaryArtifacts[i].location");
        md5sum = CkJsonObjectW_stringOf(jResp,L"build.secondaryArtifacts[i].md5sum");
        overrideArtifactName = CkJsonObjectW_IntOf(jResp,L"build.secondaryArtifacts[i].overrideArtifactName");
        sha256sum = CkJsonObjectW_stringOf(jResp,L"build.secondaryArtifacts[i].sha256sum");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"build.secondarySources");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        authResource = CkJsonObjectW_stringOf(jResp,L"build.secondarySources[i].auth.resource");
        authType = CkJsonObjectW_stringOf(jResp,L"build.secondarySources[i].auth.type");
        buildspec = CkJsonObjectW_stringOf(jResp,L"build.secondarySources[i].buildspec");
        buildStatusConfigContext = CkJsonObjectW_stringOf(jResp,L"build.secondarySources[i].buildStatusConfig.context");
        buildStatusConfigTargetUrl = CkJsonObjectW_stringOf(jResp,L"build.secondarySources[i].buildStatusConfig.targetUrl");
        gitCloneDepth = CkJsonObjectW_IntOf(jResp,L"build.secondarySources[i].gitCloneDepth");
        gitSubmodulesConfigFetchSubmodules = CkJsonObjectW_IntOf(jResp,L"build.secondarySources[i].gitSubmodulesConfig.fetchSubmodules");
        insecureSsl = CkJsonObjectW_IntOf(jResp,L"build.secondarySources[i].insecureSsl");
        location = CkJsonObjectW_stringOf(jResp,L"build.secondarySources[i].location");
        reportBuildStatus = CkJsonObjectW_IntOf(jResp,L"build.secondarySources[i].reportBuildStatus");
        sourceIdentifier = CkJsonObjectW_stringOf(jResp,L"build.secondarySources[i].sourceIdentifier");
        v_type = CkJsonObjectW_stringOf(jResp,L"build.secondarySources[i].type");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"build.secondarySourceVersions");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        sourceIdentifier = CkJsonObjectW_stringOf(jResp,L"build.secondarySourceVersions[i].sourceIdentifier");
        sourceVersion = CkJsonObjectW_stringOf(jResp,L"build.secondarySourceVersions[i].sourceVersion");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"build.vpcConfig.securityGroupIds");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        strVal = CkJsonObjectW_stringOf(jResp,L"build.vpcConfig.securityGroupIds[i]");
        i = i + 1;
    }

    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"build.vpcConfig.subnets");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        strVal = CkJsonObjectW_stringOf(jResp,L"build.vpcConfig.subnets[i]");
        i = i + 1;
    }

    // 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"
    //     }
    //   }
    // }


    CkRestW_Dispose(rest);
    CkAuthAwsW_Dispose(authAws);
    CkJsonObjectW_Dispose(json);
    CkStringBuilderW_Dispose(sbRequestBody);
    CkStringBuilderW_Dispose(sbResponseBody);
    CkJsonObjectW_Dispose(jResp);

    }