Chilkat Online Tools

DescribeJobs PureBasic Example

AWS Batch

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, "batch")
    ; SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
    CkRest::ckSetAuthAws(rest,authAws)

    ; URL: https://batch.us-west-2.amazonaws.com/
    ; Use the same region as specified above.
    success = CkRest::ckConnect(rest,"batch.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,"jobs[0]","string")

    ; The JSON request body created by the above code:

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

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

    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","/v1/describejobs",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

    Index.i
    Size.i
    v_String.i
    ContainerInstanceArn.s
    ExecutionRoleArn.s
    ExitCode.i
    PlatformVersion.s
    Image.s
    InstanceType.s
    JobRoleArn.s
    InitProcessEnabled.i
    MaxSwap.i
    SharedMemorySize.i
    Swappiness.i
    LogDriver.s
    OptionsString.s
    LogStreamName.s
    Memory.i
    AssignPublicIp.s
    Privileged.i
    ReadonlyRootFilesystem.i
    Reason.s
    TaskArn.s
    User.s
    Vcpus.i
    createdAt.i
    jobArn.s
    jobDefinition.s
    jobId.s
    jobName.s
    jobQueue.s
    IsMainNode.i
    NodeIndex.i
    MainNode.i
    NumNodes.i
    parametersString.s
    propagateTags.i
    Attempts.i
    schedulingPriority.i
    shareIdentifier.s
    startedAt.i
    status.s
    statusReason.s
    stoppedAt.i
    tagsString.s
    AttemptDurationSeconds.i
    j.i
    count_j.i
    containerContainerInstanceArn.s
    containerExitCode.i
    containerLogStreamName.s
    containerReason.s
    containerTaskArn.s
    k.i
    count_k.i
    attachmentId.s
    ipv6Address.s
    privateIpv4Address.s
    strVal.s
    name.s
    value.s
    containerPath.s
    hostPath.s
    size.i
    valueFrom.s
    readOnly.i
    sourceVolume.s
    v_type.s
    hardLimit.i
    softLimit.i
    AccessPointId.s
    Iam.s
    FileSystemId.s
    RootDirectory.s
    TransitEncryption.s
    TransitEncryptionPort.i
    SourcePath.s
    containerExecutionRoleArn.s
    FargatePlatformConfigurationPlatformVersion.s
    containerImage.s
    containerInstanceType.s
    containerJobRoleArn.s
    LinuxParametersInitProcessEnabled.i
    LinuxParametersMaxSwap.i
    LinuxParametersSharedMemorySize.i
    LinuxParametersSwappiness.i
    LogConfigurationLogDriver.s
    containerMemory.i
    NetworkConfigurationAssignPublicIp.s
    containerPrivileged.i
    containerReadonlyRootFilesystem.i
    containerUser.s
    containerVcpus.i
    targetNodes.s
    json1.i
    i1.i
    count_i1.i
    AuthorizationConfigAccessPointId.s
    AuthorizationConfigIam.s
    efsVolumeConfigurationFileSystemId.s
    efsVolumeConfigurationRootDirectory.s
    efsVolumeConfigurationTransitEncryption.s
    efsVolumeConfigurationTransitEncryptionPort.i
    hostSourcePath.s
    action.s
    onExitCode.s
    onReason.s
    onStatusReason.s

    i.i = 0
    count_i.i = CkJsonObject::ckSizeOfArray(jResp,"jobs")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        Index = CkJsonObject::ckIntOf(jResp,"jobs[i].arrayProperties.index")
        Size = CkJsonObject::ckIntOf(jResp,"jobs[i].arrayProperties.size")
        v_String = CkJsonObject::ckIntOf(jResp,"jobs[i].arrayProperties.statusSummary.string")
        ContainerInstanceArn = CkJsonObject::ckStringOf(jResp,"jobs[i].container.containerInstanceArn")
        ExecutionRoleArn = CkJsonObject::ckStringOf(jResp,"jobs[i].container.executionRoleArn")
        ExitCode = CkJsonObject::ckIntOf(jResp,"jobs[i].container.exitCode")
        PlatformVersion = CkJsonObject::ckStringOf(jResp,"jobs[i].container.fargatePlatformConfiguration.platformVersion")
        Image = CkJsonObject::ckStringOf(jResp,"jobs[i].container.image")
        InstanceType = CkJsonObject::ckStringOf(jResp,"jobs[i].container.instanceType")
        JobRoleArn = CkJsonObject::ckStringOf(jResp,"jobs[i].container.jobRoleArn")
        InitProcessEnabled = CkJsonObject::ckIntOf(jResp,"jobs[i].container.linuxParameters.initProcessEnabled")
        MaxSwap = CkJsonObject::ckIntOf(jResp,"jobs[i].container.linuxParameters.maxSwap")
        SharedMemorySize = CkJsonObject::ckIntOf(jResp,"jobs[i].container.linuxParameters.sharedMemorySize")
        Swappiness = CkJsonObject::ckIntOf(jResp,"jobs[i].container.linuxParameters.swappiness")
        LogDriver = CkJsonObject::ckStringOf(jResp,"jobs[i].container.logConfiguration.logDriver")
        OptionsString = CkJsonObject::ckStringOf(jResp,"jobs[i].container.logConfiguration.options.string")
        LogStreamName = CkJsonObject::ckStringOf(jResp,"jobs[i].container.logStreamName")
        Memory = CkJsonObject::ckIntOf(jResp,"jobs[i].container.memory")
        AssignPublicIp = CkJsonObject::ckStringOf(jResp,"jobs[i].container.networkConfiguration.assignPublicIp")
        Privileged = CkJsonObject::ckIntOf(jResp,"jobs[i].container.privileged")
        ReadonlyRootFilesystem = CkJsonObject::ckIntOf(jResp,"jobs[i].container.readonlyRootFilesystem")
        Reason = CkJsonObject::ckStringOf(jResp,"jobs[i].container.reason")
        TaskArn = CkJsonObject::ckStringOf(jResp,"jobs[i].container.taskArn")
        User = CkJsonObject::ckStringOf(jResp,"jobs[i].container.user")
        Vcpus = CkJsonObject::ckIntOf(jResp,"jobs[i].container.vcpus")
        createdAt = CkJsonObject::ckIntOf(jResp,"jobs[i].createdAt")
        jobArn = CkJsonObject::ckStringOf(jResp,"jobs[i].jobArn")
        jobDefinition = CkJsonObject::ckStringOf(jResp,"jobs[i].jobDefinition")
        jobId = CkJsonObject::ckStringOf(jResp,"jobs[i].jobId")
        jobName = CkJsonObject::ckStringOf(jResp,"jobs[i].jobName")
        jobQueue = CkJsonObject::ckStringOf(jResp,"jobs[i].jobQueue")
        IsMainNode = CkJsonObject::ckIntOf(jResp,"jobs[i].nodeDetails.isMainNode")
        NodeIndex = CkJsonObject::ckIntOf(jResp,"jobs[i].nodeDetails.nodeIndex")
        MainNode = CkJsonObject::ckIntOf(jResp,"jobs[i].nodeProperties.mainNode")
        NumNodes = CkJsonObject::ckIntOf(jResp,"jobs[i].nodeProperties.numNodes")
        parametersString = CkJsonObject::ckStringOf(jResp,"jobs[i].parameters.string")
        propagateTags = CkJsonObject::ckIntOf(jResp,"jobs[i].propagateTags")
        Attempts = CkJsonObject::ckIntOf(jResp,"jobs[i].retryStrategy.attempts")
        schedulingPriority = CkJsonObject::ckIntOf(jResp,"jobs[i].schedulingPriority")
        shareIdentifier = CkJsonObject::ckStringOf(jResp,"jobs[i].shareIdentifier")
        startedAt = CkJsonObject::ckIntOf(jResp,"jobs[i].startedAt")
        status = CkJsonObject::ckStringOf(jResp,"jobs[i].status")
        statusReason = CkJsonObject::ckStringOf(jResp,"jobs[i].statusReason")
        stoppedAt = CkJsonObject::ckIntOf(jResp,"jobs[i].stoppedAt")
        tagsString = CkJsonObject::ckStringOf(jResp,"jobs[i].tags.string")
        AttemptDurationSeconds = CkJsonObject::ckIntOf(jResp,"jobs[i].timeout.attemptDurationSeconds")
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].attempts")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            containerContainerInstanceArn = CkJsonObject::ckStringOf(jResp,"jobs[i].attempts[j].container.containerInstanceArn")
            containerExitCode = CkJsonObject::ckIntOf(jResp,"jobs[i].attempts[j].container.exitCode")
            containerLogStreamName = CkJsonObject::ckStringOf(jResp,"jobs[i].attempts[j].container.logStreamName")
            containerReason = CkJsonObject::ckStringOf(jResp,"jobs[i].attempts[j].container.reason")
            containerTaskArn = CkJsonObject::ckStringOf(jResp,"jobs[i].attempts[j].container.taskArn")
            startedAt = CkJsonObject::ckIntOf(jResp,"jobs[i].attempts[j].startedAt")
            statusReason = CkJsonObject::ckStringOf(jResp,"jobs[i].attempts[j].statusReason")
            stoppedAt = CkJsonObject::ckIntOf(jResp,"jobs[i].attempts[j].stoppedAt")
            k = 0
            count_k = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].attempts[j].container.networkInterfaces")
            While k < count_k
                CkJsonObject::setCkK(jResp, k)
                attachmentId = CkJsonObject::ckStringOf(jResp,"jobs[i].attempts[j].container.networkInterfaces[k].attachmentId")
                ipv6Address = CkJsonObject::ckStringOf(jResp,"jobs[i].attempts[j].container.networkInterfaces[k].ipv6Address")
                privateIpv4Address = CkJsonObject::ckStringOf(jResp,"jobs[i].attempts[j].container.networkInterfaces[k].privateIpv4Address")
                k = k + 1
            Wend
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].container.command")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"jobs[i].container.command[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].container.environment")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            name = CkJsonObject::ckStringOf(jResp,"jobs[i].container.environment[j].name")
            value = CkJsonObject::ckStringOf(jResp,"jobs[i].container.environment[j].value")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].container.linuxParameters.devices")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            containerPath = CkJsonObject::ckStringOf(jResp,"jobs[i].container.linuxParameters.devices[j].containerPath")
            hostPath = CkJsonObject::ckStringOf(jResp,"jobs[i].container.linuxParameters.devices[j].hostPath")
            k = 0
            count_k = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].container.linuxParameters.devices[j].permissions")
            While k < count_k
                CkJsonObject::setCkK(jResp, k)
                strVal = CkJsonObject::ckStringOf(jResp,"jobs[i].container.linuxParameters.devices[j].permissions[k]")
                k = k + 1
            Wend
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].container.linuxParameters.tmpfs")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            containerPath = CkJsonObject::ckStringOf(jResp,"jobs[i].container.linuxParameters.tmpfs[j].containerPath")
            size = CkJsonObject::ckIntOf(jResp,"jobs[i].container.linuxParameters.tmpfs[j].size")
            k = 0
            count_k = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].container.linuxParameters.tmpfs[j].mountOptions")
            While k < count_k
                CkJsonObject::setCkK(jResp, k)
                strVal = CkJsonObject::ckStringOf(jResp,"jobs[i].container.linuxParameters.tmpfs[j].mountOptions[k]")
                k = k + 1
            Wend
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].container.logConfiguration.secretOptions")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            name = CkJsonObject::ckStringOf(jResp,"jobs[i].container.logConfiguration.secretOptions[j].name")
            valueFrom = CkJsonObject::ckStringOf(jResp,"jobs[i].container.logConfiguration.secretOptions[j].valueFrom")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].container.mountPoints")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            containerPath = CkJsonObject::ckStringOf(jResp,"jobs[i].container.mountPoints[j].containerPath")
            readOnly = CkJsonObject::ckIntOf(jResp,"jobs[i].container.mountPoints[j].readOnly")
            sourceVolume = CkJsonObject::ckStringOf(jResp,"jobs[i].container.mountPoints[j].sourceVolume")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].container.networkInterfaces")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            attachmentId = CkJsonObject::ckStringOf(jResp,"jobs[i].container.networkInterfaces[j].attachmentId")
            ipv6Address = CkJsonObject::ckStringOf(jResp,"jobs[i].container.networkInterfaces[j].ipv6Address")
            privateIpv4Address = CkJsonObject::ckStringOf(jResp,"jobs[i].container.networkInterfaces[j].privateIpv4Address")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].container.resourceRequirements")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            v_type = CkJsonObject::ckStringOf(jResp,"jobs[i].container.resourceRequirements[j].type")
            value = CkJsonObject::ckStringOf(jResp,"jobs[i].container.resourceRequirements[j].value")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].container.secrets")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            name = CkJsonObject::ckStringOf(jResp,"jobs[i].container.secrets[j].name")
            valueFrom = CkJsonObject::ckStringOf(jResp,"jobs[i].container.secrets[j].valueFrom")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].container.ulimits")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            hardLimit = CkJsonObject::ckIntOf(jResp,"jobs[i].container.ulimits[j].hardLimit")
            name = CkJsonObject::ckStringOf(jResp,"jobs[i].container.ulimits[j].name")
            softLimit = CkJsonObject::ckIntOf(jResp,"jobs[i].container.ulimits[j].softLimit")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].container.volumes")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            AccessPointId = CkJsonObject::ckStringOf(jResp,"jobs[i].container.volumes[j].efsVolumeConfiguration.authorizationConfig.accessPointId")
            Iam = CkJsonObject::ckStringOf(jResp,"jobs[i].container.volumes[j].efsVolumeConfiguration.authorizationConfig.iam")
            FileSystemId = CkJsonObject::ckStringOf(jResp,"jobs[i].container.volumes[j].efsVolumeConfiguration.fileSystemId")
            RootDirectory = CkJsonObject::ckStringOf(jResp,"jobs[i].container.volumes[j].efsVolumeConfiguration.rootDirectory")
            TransitEncryption = CkJsonObject::ckStringOf(jResp,"jobs[i].container.volumes[j].efsVolumeConfiguration.transitEncryption")
            TransitEncryptionPort = CkJsonObject::ckIntOf(jResp,"jobs[i].container.volumes[j].efsVolumeConfiguration.transitEncryptionPort")
            SourcePath = CkJsonObject::ckStringOf(jResp,"jobs[i].container.volumes[j].host.sourcePath")
            name = CkJsonObject::ckStringOf(jResp,"jobs[i].container.volumes[j].name")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].dependsOn")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            jobId = CkJsonObject::ckStringOf(jResp,"jobs[i].dependsOn[j].jobId")
            v_type = CkJsonObject::ckStringOf(jResp,"jobs[i].dependsOn[j].type")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].nodeProperties.nodeRangeProperties")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            containerExecutionRoleArn = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.executionRoleArn")
            FargatePlatformConfigurationPlatformVersion = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.fargatePlatformConfiguration.platformVersion")
            containerImage = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.image")
            containerInstanceType = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.instanceType")
            containerJobRoleArn = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.jobRoleArn")
            LinuxParametersInitProcessEnabled = CkJsonObject::ckIntOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.initProcessEnabled")
            LinuxParametersMaxSwap = CkJsonObject::ckIntOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.maxSwap")
            LinuxParametersSharedMemorySize = CkJsonObject::ckIntOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.sharedMemorySize")
            LinuxParametersSwappiness = CkJsonObject::ckIntOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.swappiness")
            LogConfigurationLogDriver = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.logDriver")
            OptionsString = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.options.string")
            containerMemory = CkJsonObject::ckIntOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.memory")
            NetworkConfigurationAssignPublicIp = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.networkConfiguration.assignPublicIp")
            containerPrivileged = CkJsonObject::ckIntOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.privileged")
            containerReadonlyRootFilesystem = CkJsonObject::ckIntOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.readonlyRootFilesystem")
            containerUser = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.user")
            containerVcpus = CkJsonObject::ckIntOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.vcpus")
            targetNodes = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].targetNodes")
            k = 0
            count_k = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.command")
            While k < count_k
                CkJsonObject::setCkK(jResp, k)
                strVal = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.command[k]")
                k = k + 1
            Wend
            k = 0
            count_k = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.environment")
            While k < count_k
                CkJsonObject::setCkK(jResp, k)
                name = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.environment[k].name")
                value = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.environment[k].value")
                k = k + 1
            Wend
            k = 0
            count_k = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices")
            While k < count_k
                CkJsonObject::setCkK(jResp, k)
                containerPath = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k].containerPath")
                hostPath = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k].hostPath")

                json1 = CkJsonObject::ckObjectOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k]")
                i1 = 0
                count_i1 = CkJsonObject::ckSizeOfArray(json1,"permissions")
                While i1 < count_i1
                    CkJsonObject::setCkI(json1, i1)
                    strVal = CkJsonObject::ckStringOf(json1,"permissions[i]")
                    i1 = i1 + 1
                Wend
                CkJsonObject::ckDispose(json1)

                k = k + 1
            Wend
            k = 0
            count_k = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs")
            While k < count_k
                CkJsonObject::setCkK(jResp, k)
                containerPath = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k].containerPath")
                size = CkJsonObject::ckIntOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k].size")

                json1 = CkJsonObject::ckObjectOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k]")
                i1 = 0
                count_i1 = CkJsonObject::ckSizeOfArray(json1,"mountOptions")
                While i1 < count_i1
                    CkJsonObject::setCkI(json1, i1)
                    strVal = CkJsonObject::ckStringOf(json1,"mountOptions[i]")
                    i1 = i1 + 1
                Wend
                CkJsonObject::ckDispose(json1)

                k = k + 1
            Wend
            k = 0
            count_k = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions")
            While k < count_k
                CkJsonObject::setCkK(jResp, k)
                name = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions[k].name")
                valueFrom = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions[k].valueFrom")
                k = k + 1
            Wend
            k = 0
            count_k = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.mountPoints")
            While k < count_k
                CkJsonObject::setCkK(jResp, k)
                containerPath = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].containerPath")
                readOnly = CkJsonObject::ckIntOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].readOnly")
                sourceVolume = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].sourceVolume")
                k = k + 1
            Wend
            k = 0
            count_k = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements")
            While k < count_k
                CkJsonObject::setCkK(jResp, k)
                v_type = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements[k].type")
                value = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements[k].value")
                k = k + 1
            Wend
            k = 0
            count_k = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.secrets")
            While k < count_k
                CkJsonObject::setCkK(jResp, k)
                name = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.secrets[k].name")
                valueFrom = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.secrets[k].valueFrom")
                k = k + 1
            Wend
            k = 0
            count_k = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.ulimits")
            While k < count_k
                CkJsonObject::setCkK(jResp, k)
                hardLimit = CkJsonObject::ckIntOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].hardLimit")
                name = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].name")
                softLimit = CkJsonObject::ckIntOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].softLimit")
                k = k + 1
            Wend
            k = 0
            count_k = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes")
            While k < count_k
                CkJsonObject::setCkK(jResp, k)
                AuthorizationConfigAccessPointId = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.authorizationConfig.accessPointId")
                AuthorizationConfigIam = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.authorizationConfig.iam")
                efsVolumeConfigurationFileSystemId = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.fileSystemId")
                efsVolumeConfigurationRootDirectory = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.rootDirectory")
                efsVolumeConfigurationTransitEncryption = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.transitEncryption")
                efsVolumeConfigurationTransitEncryptionPort = CkJsonObject::ckIntOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.transitEncryptionPort")
                hostSourcePath = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].host.sourcePath")
                name = CkJsonObject::ckStringOf(jResp,"jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].name")
                k = k + 1
            Wend
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].platformCapabilities")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            strVal = CkJsonObject::ckStringOf(jResp,"jobs[i].platformCapabilities[j]")
            j = j + 1
        Wend
        j = 0
        count_j = CkJsonObject::ckSizeOfArray(jResp,"jobs[i].retryStrategy.evaluateOnExit")
        While j < count_j
            CkJsonObject::setCkJ(jResp, j)
            action = CkJsonObject::ckStringOf(jResp,"jobs[i].retryStrategy.evaluateOnExit[j].action")
            onExitCode = CkJsonObject::ckStringOf(jResp,"jobs[i].retryStrategy.evaluateOnExit[j].onExitCode")
            onReason = CkJsonObject::ckStringOf(jResp,"jobs[i].retryStrategy.evaluateOnExit[j].onReason")
            onStatusReason = CkJsonObject::ckStringOf(jResp,"jobs[i].retryStrategy.evaluateOnExit[j].onStatusReason")
            j = j + 1
        Wend
        i = i + 1
    Wend

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

    ; {
    ;   "jobs": [
    ;     {
    ;       "arrayProperties": {
    ;         "index": number,
    ;         "size": number,
    ;         "statusSummary": {
    ;           "string": number
    ;         }
    ;       },
    ;       "attempts": [
    ;         {
    ;           "container": {
    ;             "containerInstanceArn": "string",
    ;             "exitCode": number,
    ;             "logStreamName": "string",
    ;             "networkInterfaces": [
    ;               {
    ;                 "attachmentId": "string",
    ;                 "ipv6Address": "string",
    ;                 "privateIpv4Address": "string"
    ;               }
    ;             ],
    ;             "reason": "string",
    ;             "taskArn": "string"
    ;           },
    ;           "startedAt": number,
    ;           "statusReason": "string",
    ;           "stoppedAt": number
    ;         }
    ;       ],
    ;       "container": {
    ;         "command": [
    ;           "string"
    ;         ],
    ;         "containerInstanceArn": "string",
    ;         "environment": [
    ;           {
    ;             "name": "string",
    ;             "value": "string"
    ;           }
    ;         ],
    ;         "executionRoleArn": "string",
    ;         "exitCode": number,
    ;         "fargatePlatformConfiguration": {
    ;           "platformVersion": "string"
    ;         },
    ;         "image": "string",
    ;         "instanceType": "string",
    ;         "jobRoleArn": "string",
    ;         "linuxParameters": {
    ;           "devices": [
    ;             {
    ;               "containerPath": "string",
    ;               "hostPath": "string",
    ;               "permissions": [
    ;                 "string"
    ;               ]
    ;             }
    ;           ],
    ;           "initProcessEnabled": boolean,
    ;           "maxSwap": number,
    ;           "sharedMemorySize": number,
    ;           "swappiness": number,
    ;           "tmpfs": [
    ;             {
    ;               "containerPath": "string",
    ;               "mountOptions": [
    ;                 "string"
    ;               ],
    ;               "size": number
    ;             }
    ;           ]
    ;         },
    ;         "logConfiguration": {
    ;           "logDriver": "string",
    ;           "options": {
    ;             "string": "string"
    ;           },
    ;           "secretOptions": [
    ;             {
    ;               "name": "string",
    ;               "valueFrom": "string"
    ;             }
    ;           ]
    ;         },
    ;         "logStreamName": "string",
    ;         "memory": number,
    ;         "mountPoints": [
    ;           {
    ;             "containerPath": "string",
    ;             "readOnly": boolean,
    ;             "sourceVolume": "string"
    ;           }
    ;         ],
    ;         "networkConfiguration": {
    ;           "assignPublicIp": "string"
    ;         },
    ;         "networkInterfaces": [
    ;           {
    ;             "attachmentId": "string",
    ;             "ipv6Address": "string",
    ;             "privateIpv4Address": "string"
    ;           }
    ;         ],
    ;         "privileged": boolean,
    ;         "readonlyRootFilesystem": boolean,
    ;         "reason": "string",
    ;         "resourceRequirements": [
    ;           {
    ;             "type": "string",
    ;             "value": "string"
    ;           }
    ;         ],
    ;         "secrets": [
    ;           {
    ;             "name": "string",
    ;             "valueFrom": "string"
    ;           }
    ;         ],
    ;         "taskArn": "string",
    ;         "ulimits": [
    ;           {
    ;             "hardLimit": number,
    ;             "name": "string",
    ;             "softLimit": number
    ;           }
    ;         ],
    ;         "user": "string",
    ;         "vcpus": number,
    ;         "volumes": [
    ;           {
    ;             "efsVolumeConfiguration": {
    ;               "authorizationConfig": {
    ;                 "accessPointId": "string",
    ;                 "iam": "string"
    ;               },
    ;               "fileSystemId": "string",
    ;               "rootDirectory": "string",
    ;               "transitEncryption": "string",
    ;               "transitEncryptionPort": number
    ;             },
    ;             "host": {
    ;               "sourcePath": "string"
    ;             },
    ;             "name": "string"
    ;           }
    ;         ]
    ;       },
    ;       "createdAt": number,
    ;       "dependsOn": [
    ;         {
    ;           "jobId": "string",
    ;           "type": "string"
    ;         }
    ;       ],
    ;       "jobArn": "string",
    ;       "jobDefinition": "string",
    ;       "jobId": "string",
    ;       "jobName": "string",
    ;       "jobQueue": "string",
    ;       "nodeDetails": {
    ;         "isMainNode": boolean,
    ;         "nodeIndex": number
    ;       },
    ;       "nodeProperties": {
    ;         "mainNode": number,
    ;         "nodeRangeProperties": [
    ;           {
    ;             "container": {
    ;               "command": [
    ;                 "string"
    ;               ],
    ;               "environment": [
    ;                 {
    ;                   "name": "string",
    ;                   "value": "string"
    ;                 }
    ;               ],
    ;               "executionRoleArn": "string",
    ;               "fargatePlatformConfiguration": {
    ;                 "platformVersion": "string"
    ;               },
    ;               "image": "string",
    ;               "instanceType": "string",
    ;               "jobRoleArn": "string",
    ;               "linuxParameters": {
    ;                 "devices": [
    ;                   {
    ;                     "containerPath": "string",
    ;                     "hostPath": "string",
    ;                     "permissions": [
    ;                       "string"
    ;                     ]
    ;                   }
    ;                 ],
    ;                 "initProcessEnabled": boolean,
    ;                 "maxSwap": number,
    ;                 "sharedMemorySize": number,
    ;                 "swappiness": number,
    ;                 "tmpfs": [
    ;                   {
    ;                     "containerPath": "string",
    ;                     "mountOptions": [
    ;                       "string"
    ;                     ],
    ;                     "size": number
    ;                   }
    ;                 ]
    ;               },
    ;               "logConfiguration": {
    ;                 "logDriver": "string",
    ;                 "options": {
    ;                   "string": "string"
    ;                 },
    ;                 "secretOptions": [
    ;                   {
    ;                     "name": "string",
    ;                     "valueFrom": "string"
    ;                   }
    ;                 ]
    ;               },
    ;               "memory": number,
    ;               "mountPoints": [
    ;                 {
    ;                   "containerPath": "string",
    ;                   "readOnly": boolean,
    ;                   "sourceVolume": "string"
    ;                 }
    ;               ],
    ;               "networkConfiguration": {
    ;                 "assignPublicIp": "string"
    ;               },
    ;               "privileged": boolean,
    ;               "readonlyRootFilesystem": boolean,
    ;               "resourceRequirements": [
    ;                 {
    ;                   "type": "string",
    ;                   "value": "string"
    ;                 }
    ;               ],
    ;               "secrets": [
    ;                 {
    ;                   "name": "string",
    ;                   "valueFrom": "string"
    ;                 }
    ;               ],
    ;               "ulimits": [
    ;                 {
    ;                   "hardLimit": number,
    ;                   "name": "string",
    ;                   "softLimit": number
    ;                 }
    ;               ],
    ;               "user": "string",
    ;               "vcpus": number,
    ;               "volumes": [
    ;                 {
    ;                   "efsVolumeConfiguration": {
    ;                     "authorizationConfig": {
    ;                       "accessPointId": "string",
    ;                       "iam": "string"
    ;                     },
    ;                     "fileSystemId": "string",
    ;                     "rootDirectory": "string",
    ;                     "transitEncryption": "string",
    ;                     "transitEncryptionPort": number
    ;                   },
    ;                   "host": {
    ;                     "sourcePath": "string"
    ;                   },
    ;                   "name": "string"
    ;                 }
    ;               ]
    ;             },
    ;             "targetNodes": "string"
    ;           }
    ;         ],
    ;         "numNodes": number
    ;       },
    ;       "parameters": {
    ;         "string": "string"
    ;       },
    ;       "platformCapabilities": [
    ;         "string"
    ;       ],
    ;       "propagateTags": boolean,
    ;       "retryStrategy": {
    ;         "attempts": number,
    ;         "evaluateOnExit": [
    ;           {
    ;             "action": "string",
    ;             "onExitCode": "string",
    ;             "onReason": "string",
    ;             "onStatusReason": "string"
    ;           }
    ;         ]
    ;       },
    ;       "schedulingPriority": number,
    ;       "shareIdentifier": "string",
    ;       "startedAt": number,
    ;       "status": "string",
    ;       "statusReason": "string",
    ;       "stoppedAt": number,
    ;       "tags": {
    ;         "string": "string"
    ;       },
    ;       "timeout": {
    ;         "attemptDurationSeconds": number
    ;       }
    ;     }
    ;   ]
    ; }


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


    ProcedureReturn
EndProcedure