DescribeJobs TCL Example
load ./chilkat.dll
# This example requires the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
set rest [new_CkRest]
set authAws [new_CkAuthAws]
CkAuthAws_put_AccessKey $authAws "AWS_ACCESS_KEY"
CkAuthAws_put_SecretKey $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_put_Region $authAws "us-west-2"
CkAuthAws_put_ServiceName $authAws "batch"
# SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
CkRest_SetAuthAws $rest $authAws
# URL: https://batch.us-west-2.amazonaws.com/
# Use the same region as specified above.
set success [CkRest_Connect $rest "batch.us-west-2.amazonaws.com" 443 1 1]
if {$success != 1} then {
puts "ConnectFailReason: [CkRest_get_ConnectFailReason $rest]"
puts [CkRest_lastErrorText $rest]
delete_CkRest $rest
delete_CkAuthAws $authAws
exit
}
# 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
set json [new_CkJsonObject]
CkJsonObject_UpdateString $json "jobs[0]" "string"
# The JSON request body created by the above code:
# {
# "jobs": [
# "string"
# ]
# }
CkRest_AddHeader $rest "Content-Type" "application/x-amz-json-1.1"
CkRest_AddHeader $rest "X-Amz-Target" "DescribeJobs"
set sbRequestBody [new_CkStringBuilder]
CkJsonObject_EmitSb $json $sbRequestBody
set sbResponseBody [new_CkStringBuilder]
set success [CkRest_FullRequestSb $rest "POST" "/v1/describejobs" $sbRequestBody $sbResponseBody]
if {$success != 1} then {
puts [CkRest_lastErrorText $rest]
delete_CkRest $rest
delete_CkAuthAws $authAws
delete_CkJsonObject $json
delete_CkStringBuilder $sbRequestBody
delete_CkStringBuilder $sbResponseBody
exit
}
set respStatusCode [CkRest_get_ResponseStatusCode $rest]
puts "response status code = $respStatusCode"
if {$respStatusCode != 200} then {
puts "Response Header:"
puts [CkRest_responseHeader $rest]
puts "Response Body:"
puts [CkStringBuilder_getAsString $sbResponseBody]
delete_CkRest $rest
delete_CkAuthAws $authAws
delete_CkJsonObject $json
delete_CkStringBuilder $sbRequestBody
delete_CkStringBuilder $sbResponseBody
exit
}
set jResp [new_CkJsonObject]
CkJsonObject_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
# json1 is a CkJsonObject
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "jobs"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set Index [CkJsonObject_IntOf $jResp "jobs[i].arrayProperties.index"]
set Size [CkJsonObject_IntOf $jResp "jobs[i].arrayProperties.size"]
set v_String [CkJsonObject_IntOf $jResp "jobs[i].arrayProperties.statusSummary.string"]
set ContainerInstanceArn [CkJsonObject_stringOf $jResp "jobs[i].container.containerInstanceArn"]
set ExecutionRoleArn [CkJsonObject_stringOf $jResp "jobs[i].container.executionRoleArn"]
set ExitCode [CkJsonObject_IntOf $jResp "jobs[i].container.exitCode"]
set PlatformVersion [CkJsonObject_stringOf $jResp "jobs[i].container.fargatePlatformConfiguration.platformVersion"]
set Image [CkJsonObject_stringOf $jResp "jobs[i].container.image"]
set InstanceType [CkJsonObject_stringOf $jResp "jobs[i].container.instanceType"]
set JobRoleArn [CkJsonObject_stringOf $jResp "jobs[i].container.jobRoleArn"]
set InitProcessEnabled [CkJsonObject_IntOf $jResp "jobs[i].container.linuxParameters.initProcessEnabled"]
set MaxSwap [CkJsonObject_IntOf $jResp "jobs[i].container.linuxParameters.maxSwap"]
set SharedMemorySize [CkJsonObject_IntOf $jResp "jobs[i].container.linuxParameters.sharedMemorySize"]
set Swappiness [CkJsonObject_IntOf $jResp "jobs[i].container.linuxParameters.swappiness"]
set LogDriver [CkJsonObject_stringOf $jResp "jobs[i].container.logConfiguration.logDriver"]
set OptionsString [CkJsonObject_stringOf $jResp "jobs[i].container.logConfiguration.options.string"]
set LogStreamName [CkJsonObject_stringOf $jResp "jobs[i].container.logStreamName"]
set Memory [CkJsonObject_IntOf $jResp "jobs[i].container.memory"]
set AssignPublicIp [CkJsonObject_stringOf $jResp "jobs[i].container.networkConfiguration.assignPublicIp"]
set Privileged [CkJsonObject_IntOf $jResp "jobs[i].container.privileged"]
set ReadonlyRootFilesystem [CkJsonObject_IntOf $jResp "jobs[i].container.readonlyRootFilesystem"]
set Reason [CkJsonObject_stringOf $jResp "jobs[i].container.reason"]
set TaskArn [CkJsonObject_stringOf $jResp "jobs[i].container.taskArn"]
set User [CkJsonObject_stringOf $jResp "jobs[i].container.user"]
set Vcpus [CkJsonObject_IntOf $jResp "jobs[i].container.vcpus"]
set createdAt [CkJsonObject_IntOf $jResp "jobs[i].createdAt"]
set jobArn [CkJsonObject_stringOf $jResp "jobs[i].jobArn"]
set jobDefinition [CkJsonObject_stringOf $jResp "jobs[i].jobDefinition"]
set jobId [CkJsonObject_stringOf $jResp "jobs[i].jobId"]
set jobName [CkJsonObject_stringOf $jResp "jobs[i].jobName"]
set jobQueue [CkJsonObject_stringOf $jResp "jobs[i].jobQueue"]
set IsMainNode [CkJsonObject_IntOf $jResp "jobs[i].nodeDetails.isMainNode"]
set NodeIndex [CkJsonObject_IntOf $jResp "jobs[i].nodeDetails.nodeIndex"]
set MainNode [CkJsonObject_IntOf $jResp "jobs[i].nodeProperties.mainNode"]
set NumNodes [CkJsonObject_IntOf $jResp "jobs[i].nodeProperties.numNodes"]
set parametersString [CkJsonObject_stringOf $jResp "jobs[i].parameters.string"]
set propagateTags [CkJsonObject_IntOf $jResp "jobs[i].propagateTags"]
set Attempts [CkJsonObject_IntOf $jResp "jobs[i].retryStrategy.attempts"]
set schedulingPriority [CkJsonObject_IntOf $jResp "jobs[i].schedulingPriority"]
set shareIdentifier [CkJsonObject_stringOf $jResp "jobs[i].shareIdentifier"]
set startedAt [CkJsonObject_IntOf $jResp "jobs[i].startedAt"]
set status [CkJsonObject_stringOf $jResp "jobs[i].status"]
set statusReason [CkJsonObject_stringOf $jResp "jobs[i].statusReason"]
set stoppedAt [CkJsonObject_IntOf $jResp "jobs[i].stoppedAt"]
set tagsString [CkJsonObject_stringOf $jResp "jobs[i].tags.string"]
set AttemptDurationSeconds [CkJsonObject_IntOf $jResp "jobs[i].timeout.attemptDurationSeconds"]
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "jobs[i].attempts"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set containerContainerInstanceArn [CkJsonObject_stringOf $jResp "jobs[i].attempts[j].container.containerInstanceArn"]
set containerExitCode [CkJsonObject_IntOf $jResp "jobs[i].attempts[j].container.exitCode"]
set containerLogStreamName [CkJsonObject_stringOf $jResp "jobs[i].attempts[j].container.logStreamName"]
set containerReason [CkJsonObject_stringOf $jResp "jobs[i].attempts[j].container.reason"]
set containerTaskArn [CkJsonObject_stringOf $jResp "jobs[i].attempts[j].container.taskArn"]
set startedAt [CkJsonObject_IntOf $jResp "jobs[i].attempts[j].startedAt"]
set statusReason [CkJsonObject_stringOf $jResp "jobs[i].attempts[j].statusReason"]
set stoppedAt [CkJsonObject_IntOf $jResp "jobs[i].attempts[j].stoppedAt"]
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "jobs[i].attempts[j].container.networkInterfaces"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set attachmentId [CkJsonObject_stringOf $jResp "jobs[i].attempts[j].container.networkInterfaces[k].attachmentId"]
set ipv6Address [CkJsonObject_stringOf $jResp "jobs[i].attempts[j].container.networkInterfaces[k].ipv6Address"]
set privateIpv4Address [CkJsonObject_stringOf $jResp "jobs[i].attempts[j].container.networkInterfaces[k].privateIpv4Address"]
set k [expr $k + 1]
}
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "jobs[i].container.command"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "jobs[i].container.command[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "jobs[i].container.environment"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set name [CkJsonObject_stringOf $jResp "jobs[i].container.environment[j].name"]
set value [CkJsonObject_stringOf $jResp "jobs[i].container.environment[j].value"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "jobs[i].container.linuxParameters.devices"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set containerPath [CkJsonObject_stringOf $jResp "jobs[i].container.linuxParameters.devices[j].containerPath"]
set hostPath [CkJsonObject_stringOf $jResp "jobs[i].container.linuxParameters.devices[j].hostPath"]
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "jobs[i].container.linuxParameters.devices[j].permissions"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set strVal [CkJsonObject_stringOf $jResp "jobs[i].container.linuxParameters.devices[j].permissions[k]"]
set k [expr $k + 1]
}
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "jobs[i].container.linuxParameters.tmpfs"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set containerPath [CkJsonObject_stringOf $jResp "jobs[i].container.linuxParameters.tmpfs[j].containerPath"]
set size [CkJsonObject_IntOf $jResp "jobs[i].container.linuxParameters.tmpfs[j].size"]
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "jobs[i].container.linuxParameters.tmpfs[j].mountOptions"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set strVal [CkJsonObject_stringOf $jResp "jobs[i].container.linuxParameters.tmpfs[j].mountOptions[k]"]
set k [expr $k + 1]
}
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "jobs[i].container.logConfiguration.secretOptions"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set name [CkJsonObject_stringOf $jResp "jobs[i].container.logConfiguration.secretOptions[j].name"]
set valueFrom [CkJsonObject_stringOf $jResp "jobs[i].container.logConfiguration.secretOptions[j].valueFrom"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "jobs[i].container.mountPoints"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set containerPath [CkJsonObject_stringOf $jResp "jobs[i].container.mountPoints[j].containerPath"]
set readOnly [CkJsonObject_IntOf $jResp "jobs[i].container.mountPoints[j].readOnly"]
set sourceVolume [CkJsonObject_stringOf $jResp "jobs[i].container.mountPoints[j].sourceVolume"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "jobs[i].container.networkInterfaces"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set attachmentId [CkJsonObject_stringOf $jResp "jobs[i].container.networkInterfaces[j].attachmentId"]
set ipv6Address [CkJsonObject_stringOf $jResp "jobs[i].container.networkInterfaces[j].ipv6Address"]
set privateIpv4Address [CkJsonObject_stringOf $jResp "jobs[i].container.networkInterfaces[j].privateIpv4Address"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "jobs[i].container.resourceRequirements"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set v_type [CkJsonObject_stringOf $jResp "jobs[i].container.resourceRequirements[j].type"]
set value [CkJsonObject_stringOf $jResp "jobs[i].container.resourceRequirements[j].value"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "jobs[i].container.secrets"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set name [CkJsonObject_stringOf $jResp "jobs[i].container.secrets[j].name"]
set valueFrom [CkJsonObject_stringOf $jResp "jobs[i].container.secrets[j].valueFrom"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "jobs[i].container.ulimits"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set hardLimit [CkJsonObject_IntOf $jResp "jobs[i].container.ulimits[j].hardLimit"]
set name [CkJsonObject_stringOf $jResp "jobs[i].container.ulimits[j].name"]
set softLimit [CkJsonObject_IntOf $jResp "jobs[i].container.ulimits[j].softLimit"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "jobs[i].container.volumes"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set AccessPointId [CkJsonObject_stringOf $jResp "jobs[i].container.volumes[j].efsVolumeConfiguration.authorizationConfig.accessPointId"]
set Iam [CkJsonObject_stringOf $jResp "jobs[i].container.volumes[j].efsVolumeConfiguration.authorizationConfig.iam"]
set FileSystemId [CkJsonObject_stringOf $jResp "jobs[i].container.volumes[j].efsVolumeConfiguration.fileSystemId"]
set RootDirectory [CkJsonObject_stringOf $jResp "jobs[i].container.volumes[j].efsVolumeConfiguration.rootDirectory"]
set TransitEncryption [CkJsonObject_stringOf $jResp "jobs[i].container.volumes[j].efsVolumeConfiguration.transitEncryption"]
set TransitEncryptionPort [CkJsonObject_IntOf $jResp "jobs[i].container.volumes[j].efsVolumeConfiguration.transitEncryptionPort"]
set SourcePath [CkJsonObject_stringOf $jResp "jobs[i].container.volumes[j].host.sourcePath"]
set name [CkJsonObject_stringOf $jResp "jobs[i].container.volumes[j].name"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "jobs[i].dependsOn"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set jobId [CkJsonObject_stringOf $jResp "jobs[i].dependsOn[j].jobId"]
set v_type [CkJsonObject_stringOf $jResp "jobs[i].dependsOn[j].type"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "jobs[i].nodeProperties.nodeRangeProperties"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set containerExecutionRoleArn [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.executionRoleArn"]
set FargatePlatformConfigurationPlatformVersion [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.fargatePlatformConfiguration.platformVersion"]
set containerImage [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.image"]
set containerInstanceType [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.instanceType"]
set containerJobRoleArn [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.jobRoleArn"]
set LinuxParametersInitProcessEnabled [CkJsonObject_IntOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.initProcessEnabled"]
set LinuxParametersMaxSwap [CkJsonObject_IntOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.maxSwap"]
set LinuxParametersSharedMemorySize [CkJsonObject_IntOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.sharedMemorySize"]
set LinuxParametersSwappiness [CkJsonObject_IntOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.swappiness"]
set LogConfigurationLogDriver [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.logDriver"]
set OptionsString [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.options.string"]
set containerMemory [CkJsonObject_IntOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.memory"]
set NetworkConfigurationAssignPublicIp [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.networkConfiguration.assignPublicIp"]
set containerPrivileged [CkJsonObject_IntOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.privileged"]
set containerReadonlyRootFilesystem [CkJsonObject_IntOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.readonlyRootFilesystem"]
set containerUser [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.user"]
set containerVcpus [CkJsonObject_IntOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.vcpus"]
set targetNodes [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].targetNodes"]
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.command"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set strVal [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.command[k]"]
set k [expr $k + 1]
}
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.environment"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set name [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.environment[k].name"]
set value [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.environment[k].value"]
set k [expr $k + 1]
}
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set containerPath [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k].containerPath"]
set hostPath [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k].hostPath"]
set json1 [CkJsonObject_ObjectOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k]"]
set i1 0
set count_i1 [CkJsonObject_SizeOfArray $json1 "permissions"]
while {$i1 < $count_i1} {
CkJsonObject_put_I $json1 $i1
set strVal [CkJsonObject_stringOf $json1 "permissions[i]"]
set i1 [expr $i1 + 1]
}
delete_CkJsonObject $json1
set k [expr $k + 1]
}
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set containerPath [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k].containerPath"]
set size [CkJsonObject_IntOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k].size"]
set json1 [CkJsonObject_ObjectOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k]"]
set i1 0
set count_i1 [CkJsonObject_SizeOfArray $json1 "mountOptions"]
while {$i1 < $count_i1} {
CkJsonObject_put_I $json1 $i1
set strVal [CkJsonObject_stringOf $json1 "mountOptions[i]"]
set i1 [expr $i1 + 1]
}
delete_CkJsonObject $json1
set k [expr $k + 1]
}
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set name [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions[k].name"]
set valueFrom [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions[k].valueFrom"]
set k [expr $k + 1]
}
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.mountPoints"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set containerPath [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].containerPath"]
set readOnly [CkJsonObject_IntOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].readOnly"]
set sourceVolume [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].sourceVolume"]
set k [expr $k + 1]
}
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set v_type [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements[k].type"]
set value [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements[k].value"]
set k [expr $k + 1]
}
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.secrets"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set name [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.secrets[k].name"]
set valueFrom [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.secrets[k].valueFrom"]
set k [expr $k + 1]
}
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.ulimits"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set hardLimit [CkJsonObject_IntOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].hardLimit"]
set name [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].name"]
set softLimit [CkJsonObject_IntOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].softLimit"]
set k [expr $k + 1]
}
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set AuthorizationConfigAccessPointId [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.authorizationConfig.accessPointId"]
set AuthorizationConfigIam [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.authorizationConfig.iam"]
set efsVolumeConfigurationFileSystemId [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.fileSystemId"]
set efsVolumeConfigurationRootDirectory [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.rootDirectory"]
set efsVolumeConfigurationTransitEncryption [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.transitEncryption"]
set efsVolumeConfigurationTransitEncryptionPort [CkJsonObject_IntOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.transitEncryptionPort"]
set hostSourcePath [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].host.sourcePath"]
set name [CkJsonObject_stringOf $jResp "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].name"]
set k [expr $k + 1]
}
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "jobs[i].platformCapabilities"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "jobs[i].platformCapabilities[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "jobs[i].retryStrategy.evaluateOnExit"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set action [CkJsonObject_stringOf $jResp "jobs[i].retryStrategy.evaluateOnExit[j].action"]
set onExitCode [CkJsonObject_stringOf $jResp "jobs[i].retryStrategy.evaluateOnExit[j].onExitCode"]
set onReason [CkJsonObject_stringOf $jResp "jobs[i].retryStrategy.evaluateOnExit[j].onReason"]
set onStatusReason [CkJsonObject_stringOf $jResp "jobs[i].retryStrategy.evaluateOnExit[j].onStatusReason"]
set j [expr $j + 1]
}
set i [expr $i + 1]
}
# 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
# }
# }
# ]
# }
delete_CkRest $rest
delete_CkAuthAws $authAws
delete_CkJsonObject $json
delete_CkStringBuilder $sbRequestBody
delete_CkStringBuilder $sbResponseBody
delete_CkJsonObject $jResp