DescribeJobs Swift3 Example
func chilkatTest() {
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let rest = CkoRest()!
var success: Bool
let authAws = CkoAuthAws()!
authAws.accessKey = "AWS_ACCESS_KEY"
authAws.secretKey = "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.)
authAws.region = "us-west-2"
authAws.serviceName = "batch"
// SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
rest.setAuthAws(authAws)
// URL: https://batch.us-west-2.amazonaws.com/
// Use the same region as specified above.
success = rest.connect("batch.us-west-2.amazonaws.com", port: 443, tls: true, autoReconnect: true)
if success != true {
print("ConnectFailReason: \(rest.connectFailReason.intValue)")
print("\(rest.lastErrorText!)")
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
let json = CkoJsonObject()!
json.update("jobs[0]", value: "string")
// The JSON request body created by the above code:
// {
// "jobs": [
// "string"
// ]
// }
rest.addHeader("Content-Type", value: "application/x-amz-json-1.1")
rest.addHeader("X-Amz-Target", value: "DescribeJobs")
let sbRequestBody = CkoStringBuilder()!
json.emitSb(sbRequestBody)
let sbResponseBody = CkoStringBuilder()!
success = rest.fullRequestSb("POST", uriPath: "/v1/describejobs", requestBody: sbRequestBody, responseBody: sbResponseBody)
if success != true {
print("\(rest.lastErrorText!)")
return
}
var respStatusCode: Int = rest.responseStatusCode.intValue
print("response status code = \(respStatusCode)")
if respStatusCode != 200 {
print("Response Header:")
print("\(rest.responseHeader!)")
print("Response Body:")
print("\(sbResponseBody.getAsString()!)")
return
}
let jResp = CkoJsonObject()!
jResp.loadSb(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
var Index: Int
var Size: Int
var v_String: Int
var ContainerInstanceArn: String?
var ExecutionRoleArn: String?
var ExitCode: Int
var PlatformVersion: String?
var Image: String?
var InstanceType: String?
var JobRoleArn: String?
var InitProcessEnabled: Int
var MaxSwap: Int
var SharedMemorySize: Int
var Swappiness: Int
var LogDriver: String?
var OptionsString: String?
var LogStreamName: String?
var Memory: Int
var AssignPublicIp: String?
var Privileged: Int
var ReadonlyRootFilesystem: Int
var Reason: String?
var TaskArn: String?
var User: String?
var Vcpus: Int
var createdAt: Int
var jobArn: String?
var jobDefinition: String?
var jobId: String?
var jobName: String?
var jobQueue: String?
var IsMainNode: Int
var NodeIndex: Int
var MainNode: Int
var NumNodes: Int
var parametersString: String?
var propagateTags: Int
var Attempts: Int
var schedulingPriority: Int
var shareIdentifier: String?
var startedAt: Int
var status: String?
var statusReason: String?
var stoppedAt: Int
var tagsString: String?
var AttemptDurationSeconds: Int
var j: Int
var count_j: Int
var containerContainerInstanceArn: String?
var containerExitCode: Int
var containerLogStreamName: String?
var containerReason: String?
var containerTaskArn: String?
var k: Int
var count_k: Int
var attachmentId: String?
var ipv6Address: String?
var privateIpv4Address: String?
var strVal: String?
var name: String?
var value: String?
var containerPath: String?
var hostPath: String?
var size: Int
var valueFrom: String?
var readOnly: Int
var sourceVolume: String?
var v_type: String?
var hardLimit: Int
var softLimit: Int
var AccessPointId: String?
var Iam: String?
var FileSystemId: String?
var RootDirectory: String?
var TransitEncryption: String?
var TransitEncryptionPort: Int
var SourcePath: String?
var containerExecutionRoleArn: String?
var FargatePlatformConfigurationPlatformVersion: String?
var containerImage: String?
var containerInstanceType: String?
var containerJobRoleArn: String?
var LinuxParametersInitProcessEnabled: Int
var LinuxParametersMaxSwap: Int
var LinuxParametersSharedMemorySize: Int
var LinuxParametersSwappiness: Int
var LogConfigurationLogDriver: String?
var containerMemory: Int
var NetworkConfigurationAssignPublicIp: String?
var containerPrivileged: Int
var containerReadonlyRootFilesystem: Int
var containerUser: String?
var containerVcpus: Int
var targetNodes: String?
var json1: CkoJsonObject?
var i1: Int
var count_i1: Int
var AuthorizationConfigAccessPointId: String?
var AuthorizationConfigIam: String?
var efsVolumeConfigurationFileSystemId: String?
var efsVolumeConfigurationRootDirectory: String?
var efsVolumeConfigurationTransitEncryption: String?
var efsVolumeConfigurationTransitEncryptionPort: Int
var hostSourcePath: String?
var action: String?
var onExitCode: String?
var onReason: String?
var onStatusReason: String?
var i: Int = 0
var count_i: Int = jResp.size(ofArray: "jobs").intValue
while i < count_i {
jResp.i = i
Index = jResp.int(of: "jobs[i].arrayProperties.index").intValue
Size = jResp.int(of: "jobs[i].arrayProperties.size").intValue
v_String = jResp.int(of: "jobs[i].arrayProperties.statusSummary.string").intValue
ContainerInstanceArn = jResp.string(of: "jobs[i].container.containerInstanceArn")
ExecutionRoleArn = jResp.string(of: "jobs[i].container.executionRoleArn")
ExitCode = jResp.int(of: "jobs[i].container.exitCode").intValue
PlatformVersion = jResp.string(of: "jobs[i].container.fargatePlatformConfiguration.platformVersion")
Image = jResp.string(of: "jobs[i].container.image")
InstanceType = jResp.string(of: "jobs[i].container.instanceType")
JobRoleArn = jResp.string(of: "jobs[i].container.jobRoleArn")
InitProcessEnabled = jResp.int(of: "jobs[i].container.linuxParameters.initProcessEnabled").intValue
MaxSwap = jResp.int(of: "jobs[i].container.linuxParameters.maxSwap").intValue
SharedMemorySize = jResp.int(of: "jobs[i].container.linuxParameters.sharedMemorySize").intValue
Swappiness = jResp.int(of: "jobs[i].container.linuxParameters.swappiness").intValue
LogDriver = jResp.string(of: "jobs[i].container.logConfiguration.logDriver")
OptionsString = jResp.string(of: "jobs[i].container.logConfiguration.options.string")
LogStreamName = jResp.string(of: "jobs[i].container.logStreamName")
Memory = jResp.int(of: "jobs[i].container.memory").intValue
AssignPublicIp = jResp.string(of: "jobs[i].container.networkConfiguration.assignPublicIp")
Privileged = jResp.int(of: "jobs[i].container.privileged").intValue
ReadonlyRootFilesystem = jResp.int(of: "jobs[i].container.readonlyRootFilesystem").intValue
Reason = jResp.string(of: "jobs[i].container.reason")
TaskArn = jResp.string(of: "jobs[i].container.taskArn")
User = jResp.string(of: "jobs[i].container.user")
Vcpus = jResp.int(of: "jobs[i].container.vcpus").intValue
createdAt = jResp.int(of: "jobs[i].createdAt").intValue
jobArn = jResp.string(of: "jobs[i].jobArn")
jobDefinition = jResp.string(of: "jobs[i].jobDefinition")
jobId = jResp.string(of: "jobs[i].jobId")
jobName = jResp.string(of: "jobs[i].jobName")
jobQueue = jResp.string(of: "jobs[i].jobQueue")
IsMainNode = jResp.int(of: "jobs[i].nodeDetails.isMainNode").intValue
NodeIndex = jResp.int(of: "jobs[i].nodeDetails.nodeIndex").intValue
MainNode = jResp.int(of: "jobs[i].nodeProperties.mainNode").intValue
NumNodes = jResp.int(of: "jobs[i].nodeProperties.numNodes").intValue
parametersString = jResp.string(of: "jobs[i].parameters.string")
propagateTags = jResp.int(of: "jobs[i].propagateTags").intValue
Attempts = jResp.int(of: "jobs[i].retryStrategy.attempts").intValue
schedulingPriority = jResp.int(of: "jobs[i].schedulingPriority").intValue
shareIdentifier = jResp.string(of: "jobs[i].shareIdentifier")
startedAt = jResp.int(of: "jobs[i].startedAt").intValue
status = jResp.string(of: "jobs[i].status")
statusReason = jResp.string(of: "jobs[i].statusReason")
stoppedAt = jResp.int(of: "jobs[i].stoppedAt").intValue
tagsString = jResp.string(of: "jobs[i].tags.string")
AttemptDurationSeconds = jResp.int(of: "jobs[i].timeout.attemptDurationSeconds").intValue
j = 0
count_j = jResp.size(ofArray: "jobs[i].attempts").intValue
while j < count_j {
jResp.j = j
containerContainerInstanceArn = jResp.string(of: "jobs[i].attempts[j].container.containerInstanceArn")
containerExitCode = jResp.int(of: "jobs[i].attempts[j].container.exitCode").intValue
containerLogStreamName = jResp.string(of: "jobs[i].attempts[j].container.logStreamName")
containerReason = jResp.string(of: "jobs[i].attempts[j].container.reason")
containerTaskArn = jResp.string(of: "jobs[i].attempts[j].container.taskArn")
startedAt = jResp.int(of: "jobs[i].attempts[j].startedAt").intValue
statusReason = jResp.string(of: "jobs[i].attempts[j].statusReason")
stoppedAt = jResp.int(of: "jobs[i].attempts[j].stoppedAt").intValue
k = 0
count_k = jResp.size(ofArray: "jobs[i].attempts[j].container.networkInterfaces").intValue
while k < count_k {
jResp.k = k
attachmentId = jResp.string(of: "jobs[i].attempts[j].container.networkInterfaces[k].attachmentId")
ipv6Address = jResp.string(of: "jobs[i].attempts[j].container.networkInterfaces[k].ipv6Address")
privateIpv4Address = jResp.string(of: "jobs[i].attempts[j].container.networkInterfaces[k].privateIpv4Address")
k = k + 1
}
j = j + 1
}
j = 0
count_j = jResp.size(ofArray: "jobs[i].container.command").intValue
while j < count_j {
jResp.j = j
strVal = jResp.string(of: "jobs[i].container.command[j]")
j = j + 1
}
j = 0
count_j = jResp.size(ofArray: "jobs[i].container.environment").intValue
while j < count_j {
jResp.j = j
name = jResp.string(of: "jobs[i].container.environment[j].name")
value = jResp.string(of: "jobs[i].container.environment[j].value")
j = j + 1
}
j = 0
count_j = jResp.size(ofArray: "jobs[i].container.linuxParameters.devices").intValue
while j < count_j {
jResp.j = j
containerPath = jResp.string(of: "jobs[i].container.linuxParameters.devices[j].containerPath")
hostPath = jResp.string(of: "jobs[i].container.linuxParameters.devices[j].hostPath")
k = 0
count_k = jResp.size(ofArray: "jobs[i].container.linuxParameters.devices[j].permissions").intValue
while k < count_k {
jResp.k = k
strVal = jResp.string(of: "jobs[i].container.linuxParameters.devices[j].permissions[k]")
k = k + 1
}
j = j + 1
}
j = 0
count_j = jResp.size(ofArray: "jobs[i].container.linuxParameters.tmpfs").intValue
while j < count_j {
jResp.j = j
containerPath = jResp.string(of: "jobs[i].container.linuxParameters.tmpfs[j].containerPath")
size = jResp.int(of: "jobs[i].container.linuxParameters.tmpfs[j].size").intValue
k = 0
count_k = jResp.size(ofArray: "jobs[i].container.linuxParameters.tmpfs[j].mountOptions").intValue
while k < count_k {
jResp.k = k
strVal = jResp.string(of: "jobs[i].container.linuxParameters.tmpfs[j].mountOptions[k]")
k = k + 1
}
j = j + 1
}
j = 0
count_j = jResp.size(ofArray: "jobs[i].container.logConfiguration.secretOptions").intValue
while j < count_j {
jResp.j = j
name = jResp.string(of: "jobs[i].container.logConfiguration.secretOptions[j].name")
valueFrom = jResp.string(of: "jobs[i].container.logConfiguration.secretOptions[j].valueFrom")
j = j + 1
}
j = 0
count_j = jResp.size(ofArray: "jobs[i].container.mountPoints").intValue
while j < count_j {
jResp.j = j
containerPath = jResp.string(of: "jobs[i].container.mountPoints[j].containerPath")
readOnly = jResp.int(of: "jobs[i].container.mountPoints[j].readOnly").intValue
sourceVolume = jResp.string(of: "jobs[i].container.mountPoints[j].sourceVolume")
j = j + 1
}
j = 0
count_j = jResp.size(ofArray: "jobs[i].container.networkInterfaces").intValue
while j < count_j {
jResp.j = j
attachmentId = jResp.string(of: "jobs[i].container.networkInterfaces[j].attachmentId")
ipv6Address = jResp.string(of: "jobs[i].container.networkInterfaces[j].ipv6Address")
privateIpv4Address = jResp.string(of: "jobs[i].container.networkInterfaces[j].privateIpv4Address")
j = j + 1
}
j = 0
count_j = jResp.size(ofArray: "jobs[i].container.resourceRequirements").intValue
while j < count_j {
jResp.j = j
v_type = jResp.string(of: "jobs[i].container.resourceRequirements[j].type")
value = jResp.string(of: "jobs[i].container.resourceRequirements[j].value")
j = j + 1
}
j = 0
count_j = jResp.size(ofArray: "jobs[i].container.secrets").intValue
while j < count_j {
jResp.j = j
name = jResp.string(of: "jobs[i].container.secrets[j].name")
valueFrom = jResp.string(of: "jobs[i].container.secrets[j].valueFrom")
j = j + 1
}
j = 0
count_j = jResp.size(ofArray: "jobs[i].container.ulimits").intValue
while j < count_j {
jResp.j = j
hardLimit = jResp.int(of: "jobs[i].container.ulimits[j].hardLimit").intValue
name = jResp.string(of: "jobs[i].container.ulimits[j].name")
softLimit = jResp.int(of: "jobs[i].container.ulimits[j].softLimit").intValue
j = j + 1
}
j = 0
count_j = jResp.size(ofArray: "jobs[i].container.volumes").intValue
while j < count_j {
jResp.j = j
AccessPointId = jResp.string(of: "jobs[i].container.volumes[j].efsVolumeConfiguration.authorizationConfig.accessPointId")
Iam = jResp.string(of: "jobs[i].container.volumes[j].efsVolumeConfiguration.authorizationConfig.iam")
FileSystemId = jResp.string(of: "jobs[i].container.volumes[j].efsVolumeConfiguration.fileSystemId")
RootDirectory = jResp.string(of: "jobs[i].container.volumes[j].efsVolumeConfiguration.rootDirectory")
TransitEncryption = jResp.string(of: "jobs[i].container.volumes[j].efsVolumeConfiguration.transitEncryption")
TransitEncryptionPort = jResp.int(of: "jobs[i].container.volumes[j].efsVolumeConfiguration.transitEncryptionPort").intValue
SourcePath = jResp.string(of: "jobs[i].container.volumes[j].host.sourcePath")
name = jResp.string(of: "jobs[i].container.volumes[j].name")
j = j + 1
}
j = 0
count_j = jResp.size(ofArray: "jobs[i].dependsOn").intValue
while j < count_j {
jResp.j = j
jobId = jResp.string(of: "jobs[i].dependsOn[j].jobId")
v_type = jResp.string(of: "jobs[i].dependsOn[j].type")
j = j + 1
}
j = 0
count_j = jResp.size(ofArray: "jobs[i].nodeProperties.nodeRangeProperties").intValue
while j < count_j {
jResp.j = j
containerExecutionRoleArn = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.executionRoleArn")
FargatePlatformConfigurationPlatformVersion = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.fargatePlatformConfiguration.platformVersion")
containerImage = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.image")
containerInstanceType = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.instanceType")
containerJobRoleArn = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.jobRoleArn")
LinuxParametersInitProcessEnabled = jResp.int(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.initProcessEnabled").intValue
LinuxParametersMaxSwap = jResp.int(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.maxSwap").intValue
LinuxParametersSharedMemorySize = jResp.int(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.sharedMemorySize").intValue
LinuxParametersSwappiness = jResp.int(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.swappiness").intValue
LogConfigurationLogDriver = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.logDriver")
OptionsString = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.options.string")
containerMemory = jResp.int(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.memory").intValue
NetworkConfigurationAssignPublicIp = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.networkConfiguration.assignPublicIp")
containerPrivileged = jResp.int(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.privileged").intValue
containerReadonlyRootFilesystem = jResp.int(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.readonlyRootFilesystem").intValue
containerUser = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.user")
containerVcpus = jResp.int(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.vcpus").intValue
targetNodes = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].targetNodes")
k = 0
count_k = jResp.size(ofArray: "jobs[i].nodeProperties.nodeRangeProperties[j].container.command").intValue
while k < count_k {
jResp.k = k
strVal = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.command[k]")
k = k + 1
}
k = 0
count_k = jResp.size(ofArray: "jobs[i].nodeProperties.nodeRangeProperties[j].container.environment").intValue
while k < count_k {
jResp.k = k
name = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.environment[k].name")
value = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.environment[k].value")
k = k + 1
}
k = 0
count_k = jResp.size(ofArray: "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices").intValue
while k < count_k {
jResp.k = k
containerPath = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k].containerPath")
hostPath = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k].hostPath")
json1 = jResp.object(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k]")
i1 = 0
count_i1 = json1!.size(ofArray: "permissions").intValue
while i1 < count_i1 {
json1.i = i1
strVal = json1!.string(of: "permissions[i]")
i1 = i1 + 1
}
json1 = nil
k = k + 1
}
k = 0
count_k = jResp.size(ofArray: "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs").intValue
while k < count_k {
jResp.k = k
containerPath = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k].containerPath")
size = jResp.int(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k].size").intValue
json1 = jResp.object(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k]")
i1 = 0
count_i1 = json1!.size(ofArray: "mountOptions").intValue
while i1 < count_i1 {
json1.i = i1
strVal = json1!.string(of: "mountOptions[i]")
i1 = i1 + 1
}
json1 = nil
k = k + 1
}
k = 0
count_k = jResp.size(ofArray: "jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions").intValue
while k < count_k {
jResp.k = k
name = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions[k].name")
valueFrom = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions[k].valueFrom")
k = k + 1
}
k = 0
count_k = jResp.size(ofArray: "jobs[i].nodeProperties.nodeRangeProperties[j].container.mountPoints").intValue
while k < count_k {
jResp.k = k
containerPath = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].containerPath")
readOnly = jResp.int(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].readOnly").intValue
sourceVolume = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].sourceVolume")
k = k + 1
}
k = 0
count_k = jResp.size(ofArray: "jobs[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements").intValue
while k < count_k {
jResp.k = k
v_type = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements[k].type")
value = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements[k].value")
k = k + 1
}
k = 0
count_k = jResp.size(ofArray: "jobs[i].nodeProperties.nodeRangeProperties[j].container.secrets").intValue
while k < count_k {
jResp.k = k
name = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.secrets[k].name")
valueFrom = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.secrets[k].valueFrom")
k = k + 1
}
k = 0
count_k = jResp.size(ofArray: "jobs[i].nodeProperties.nodeRangeProperties[j].container.ulimits").intValue
while k < count_k {
jResp.k = k
hardLimit = jResp.int(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].hardLimit").intValue
name = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].name")
softLimit = jResp.int(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].softLimit").intValue
k = k + 1
}
k = 0
count_k = jResp.size(ofArray: "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes").intValue
while k < count_k {
jResp.k = k
AuthorizationConfigAccessPointId = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.authorizationConfig.accessPointId")
AuthorizationConfigIam = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.authorizationConfig.iam")
efsVolumeConfigurationFileSystemId = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.fileSystemId")
efsVolumeConfigurationRootDirectory = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.rootDirectory")
efsVolumeConfigurationTransitEncryption = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.transitEncryption")
efsVolumeConfigurationTransitEncryptionPort = jResp.int(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.transitEncryptionPort").intValue
hostSourcePath = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].host.sourcePath")
name = jResp.string(of: "jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].name")
k = k + 1
}
j = j + 1
}
j = 0
count_j = jResp.size(ofArray: "jobs[i].platformCapabilities").intValue
while j < count_j {
jResp.j = j
strVal = jResp.string(of: "jobs[i].platformCapabilities[j]")
j = j + 1
}
j = 0
count_j = jResp.size(ofArray: "jobs[i].retryStrategy.evaluateOnExit").intValue
while j < count_j {
jResp.j = j
action = jResp.string(of: "jobs[i].retryStrategy.evaluateOnExit[j].action")
onExitCode = jResp.string(of: "jobs[i].retryStrategy.evaluateOnExit[j].onExitCode")
onReason = jResp.string(of: "jobs[i].retryStrategy.evaluateOnExit[j].onReason")
onStatusReason = jResp.string(of: "jobs[i].retryStrategy.evaluateOnExit[j].onStatusReason")
j = j + 1
}
i = 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
// }
// }
// ]
// }
}