DescribeJobs delphiDll Example
var
rest: HCkRest;
success: Boolean;
authAws: HCkAuthAws;
json: HCkJsonObject;
sbRequestBody: HCkStringBuilder;
sbResponseBody: HCkStringBuilder;
respStatusCode: Integer;
jResp: HCkJsonObject;
Index: Integer;
Size: Integer;
v_String: Integer;
ContainerInstanceArn: PWideChar;
ExecutionRoleArn: PWideChar;
ExitCode: Integer;
PlatformVersion: PWideChar;
Image: PWideChar;
InstanceType: PWideChar;
JobRoleArn: PWideChar;
InitProcessEnabled: Integer;
MaxSwap: Integer;
SharedMemorySize: Integer;
Swappiness: Integer;
LogDriver: PWideChar;
OptionsString: PWideChar;
LogStreamName: PWideChar;
Memory: Integer;
AssignPublicIp: PWideChar;
Privileged: Integer;
ReadonlyRootFilesystem: Integer;
Reason: PWideChar;
TaskArn: PWideChar;
User: PWideChar;
Vcpus: Integer;
createdAt: Integer;
jobArn: PWideChar;
jobDefinition: PWideChar;
jobId: PWideChar;
jobName: PWideChar;
jobQueue: PWideChar;
IsMainNode: Integer;
NodeIndex: Integer;
MainNode: Integer;
NumNodes: Integer;
parametersString: PWideChar;
propagateTags: Integer;
Attempts: Integer;
schedulingPriority: Integer;
shareIdentifier: PWideChar;
startedAt: Integer;
status: PWideChar;
statusReason: PWideChar;
stoppedAt: Integer;
tagsString: PWideChar;
AttemptDurationSeconds: Integer;
j: Integer;
count_j: Integer;
containerContainerInstanceArn: PWideChar;
containerExitCode: Integer;
containerLogStreamName: PWideChar;
containerReason: PWideChar;
containerTaskArn: PWideChar;
k: Integer;
count_k: Integer;
attachmentId: PWideChar;
ipv6Address: PWideChar;
privateIpv4Address: PWideChar;
strVal: PWideChar;
name: PWideChar;
value: PWideChar;
containerPath: PWideChar;
hostPath: PWideChar;
size: Integer;
valueFrom: PWideChar;
readOnly: Integer;
sourceVolume: PWideChar;
v_type: PWideChar;
hardLimit: Integer;
softLimit: Integer;
AccessPointId: PWideChar;
Iam: PWideChar;
FileSystemId: PWideChar;
RootDirectory: PWideChar;
TransitEncryption: PWideChar;
TransitEncryptionPort: Integer;
SourcePath: PWideChar;
containerExecutionRoleArn: PWideChar;
FargatePlatformConfigurationPlatformVersion: PWideChar;
containerImage: PWideChar;
containerInstanceType: PWideChar;
containerJobRoleArn: PWideChar;
LinuxParametersInitProcessEnabled: Integer;
LinuxParametersMaxSwap: Integer;
LinuxParametersSharedMemorySize: Integer;
LinuxParametersSwappiness: Integer;
LogConfigurationLogDriver: PWideChar;
containerMemory: Integer;
NetworkConfigurationAssignPublicIp: PWideChar;
containerPrivileged: Integer;
containerReadonlyRootFilesystem: Integer;
containerUser: PWideChar;
containerVcpus: Integer;
targetNodes: PWideChar;
json1: HCkJsonObject;
i1: Integer;
count_i1: Integer;
AuthorizationConfigAccessPointId: PWideChar;
AuthorizationConfigIam: PWideChar;
efsVolumeConfigurationFileSystemId: PWideChar;
efsVolumeConfigurationRootDirectory: PWideChar;
efsVolumeConfigurationTransitEncryption: PWideChar;
efsVolumeConfigurationTransitEncryptionPort: Integer;
hostSourcePath: PWideChar;
action: PWideChar;
onExitCode: PWideChar;
onReason: PWideChar;
onStatusReason: PWideChar;
i: Integer;
count_i: Integer;
begin
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
rest := CkRest_Create();
authAws := CkAuthAws_Create();
CkAuthAws_putAccessKey(authAws,'AWS_ACCESS_KEY');
CkAuthAws_putSecretKey(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_putRegion(authAws,'us-west-2');
CkAuthAws_putServiceName(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.
success := CkRest_Connect(rest,'batch.us-west-2.amazonaws.com',443,True,True);
if (success <> True) then
begin
Memo1.Lines.Add('ConnectFailReason: ' + IntToStr(CkRest_getConnectFailReason(rest)));
Memo1.Lines.Add(CkRest__lastErrorText(rest));
Exit;
end;
// 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 := CkJsonObject_Create();
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');
sbRequestBody := CkStringBuilder_Create();
CkJsonObject_EmitSb(json,sbRequestBody);
sbResponseBody := CkStringBuilder_Create();
success := CkRest_FullRequestSb(rest,'POST','/v1/describejobs',sbRequestBody,sbResponseBody);
if (success <> True) then
begin
Memo1.Lines.Add(CkRest__lastErrorText(rest));
Exit;
end;
respStatusCode := CkRest_getResponseStatusCode(rest);
Memo1.Lines.Add('response status code = ' + IntToStr(respStatusCode));
if (respStatusCode <> 200) then
begin
Memo1.Lines.Add('Response Header:');
Memo1.Lines.Add(CkRest__responseHeader(rest));
Memo1.Lines.Add('Response Body:');
Memo1.Lines.Add(CkStringBuilder__getAsString(sbResponseBody));
Exit;
end;
jResp := CkJsonObject_Create();
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
i := 0;
count_i := CkJsonObject_SizeOfArray(jResp,'jobs');
while i < count_i do
begin
CkJsonObject_putI(jResp,i);
Index := CkJsonObject_IntOf(jResp,'jobs[i].arrayProperties.index');
Size := CkJsonObject_IntOf(jResp,'jobs[i].arrayProperties.size');
v_String := CkJsonObject_IntOf(jResp,'jobs[i].arrayProperties.statusSummary.string');
ContainerInstanceArn := CkJsonObject__stringOf(jResp,'jobs[i].container.containerInstanceArn');
ExecutionRoleArn := CkJsonObject__stringOf(jResp,'jobs[i].container.executionRoleArn');
ExitCode := CkJsonObject_IntOf(jResp,'jobs[i].container.exitCode');
PlatformVersion := CkJsonObject__stringOf(jResp,'jobs[i].container.fargatePlatformConfiguration.platformVersion');
Image := CkJsonObject__stringOf(jResp,'jobs[i].container.image');
InstanceType := CkJsonObject__stringOf(jResp,'jobs[i].container.instanceType');
JobRoleArn := CkJsonObject__stringOf(jResp,'jobs[i].container.jobRoleArn');
InitProcessEnabled := CkJsonObject_IntOf(jResp,'jobs[i].container.linuxParameters.initProcessEnabled');
MaxSwap := CkJsonObject_IntOf(jResp,'jobs[i].container.linuxParameters.maxSwap');
SharedMemorySize := CkJsonObject_IntOf(jResp,'jobs[i].container.linuxParameters.sharedMemorySize');
Swappiness := CkJsonObject_IntOf(jResp,'jobs[i].container.linuxParameters.swappiness');
LogDriver := CkJsonObject__stringOf(jResp,'jobs[i].container.logConfiguration.logDriver');
OptionsString := CkJsonObject__stringOf(jResp,'jobs[i].container.logConfiguration.options.string');
LogStreamName := CkJsonObject__stringOf(jResp,'jobs[i].container.logStreamName');
Memory := CkJsonObject_IntOf(jResp,'jobs[i].container.memory');
AssignPublicIp := CkJsonObject__stringOf(jResp,'jobs[i].container.networkConfiguration.assignPublicIp');
Privileged := CkJsonObject_IntOf(jResp,'jobs[i].container.privileged');
ReadonlyRootFilesystem := CkJsonObject_IntOf(jResp,'jobs[i].container.readonlyRootFilesystem');
Reason := CkJsonObject__stringOf(jResp,'jobs[i].container.reason');
TaskArn := CkJsonObject__stringOf(jResp,'jobs[i].container.taskArn');
User := CkJsonObject__stringOf(jResp,'jobs[i].container.user');
Vcpus := CkJsonObject_IntOf(jResp,'jobs[i].container.vcpus');
createdAt := CkJsonObject_IntOf(jResp,'jobs[i].createdAt');
jobArn := CkJsonObject__stringOf(jResp,'jobs[i].jobArn');
jobDefinition := CkJsonObject__stringOf(jResp,'jobs[i].jobDefinition');
jobId := CkJsonObject__stringOf(jResp,'jobs[i].jobId');
jobName := CkJsonObject__stringOf(jResp,'jobs[i].jobName');
jobQueue := CkJsonObject__stringOf(jResp,'jobs[i].jobQueue');
IsMainNode := CkJsonObject_IntOf(jResp,'jobs[i].nodeDetails.isMainNode');
NodeIndex := CkJsonObject_IntOf(jResp,'jobs[i].nodeDetails.nodeIndex');
MainNode := CkJsonObject_IntOf(jResp,'jobs[i].nodeProperties.mainNode');
NumNodes := CkJsonObject_IntOf(jResp,'jobs[i].nodeProperties.numNodes');
parametersString := CkJsonObject__stringOf(jResp,'jobs[i].parameters.string');
propagateTags := CkJsonObject_IntOf(jResp,'jobs[i].propagateTags');
Attempts := CkJsonObject_IntOf(jResp,'jobs[i].retryStrategy.attempts');
schedulingPriority := CkJsonObject_IntOf(jResp,'jobs[i].schedulingPriority');
shareIdentifier := CkJsonObject__stringOf(jResp,'jobs[i].shareIdentifier');
startedAt := CkJsonObject_IntOf(jResp,'jobs[i].startedAt');
status := CkJsonObject__stringOf(jResp,'jobs[i].status');
statusReason := CkJsonObject__stringOf(jResp,'jobs[i].statusReason');
stoppedAt := CkJsonObject_IntOf(jResp,'jobs[i].stoppedAt');
tagsString := CkJsonObject__stringOf(jResp,'jobs[i].tags.string');
AttemptDurationSeconds := CkJsonObject_IntOf(jResp,'jobs[i].timeout.attemptDurationSeconds');
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'jobs[i].attempts');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
containerContainerInstanceArn := CkJsonObject__stringOf(jResp,'jobs[i].attempts[j].container.containerInstanceArn');
containerExitCode := CkJsonObject_IntOf(jResp,'jobs[i].attempts[j].container.exitCode');
containerLogStreamName := CkJsonObject__stringOf(jResp,'jobs[i].attempts[j].container.logStreamName');
containerReason := CkJsonObject__stringOf(jResp,'jobs[i].attempts[j].container.reason');
containerTaskArn := CkJsonObject__stringOf(jResp,'jobs[i].attempts[j].container.taskArn');
startedAt := CkJsonObject_IntOf(jResp,'jobs[i].attempts[j].startedAt');
statusReason := CkJsonObject__stringOf(jResp,'jobs[i].attempts[j].statusReason');
stoppedAt := CkJsonObject_IntOf(jResp,'jobs[i].attempts[j].stoppedAt');
k := 0;
count_k := CkJsonObject_SizeOfArray(jResp,'jobs[i].attempts[j].container.networkInterfaces');
while k < count_k do
begin
CkJsonObject_putK(jResp,k);
attachmentId := CkJsonObject__stringOf(jResp,'jobs[i].attempts[j].container.networkInterfaces[k].attachmentId');
ipv6Address := CkJsonObject__stringOf(jResp,'jobs[i].attempts[j].container.networkInterfaces[k].ipv6Address');
privateIpv4Address := CkJsonObject__stringOf(jResp,'jobs[i].attempts[j].container.networkInterfaces[k].privateIpv4Address');
k := k + 1;
end;
j := j + 1;
end;
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'jobs[i].container.command');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
strVal := CkJsonObject__stringOf(jResp,'jobs[i].container.command[j]');
j := j + 1;
end;
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'jobs[i].container.environment');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
name := CkJsonObject__stringOf(jResp,'jobs[i].container.environment[j].name');
value := CkJsonObject__stringOf(jResp,'jobs[i].container.environment[j].value');
j := j + 1;
end;
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'jobs[i].container.linuxParameters.devices');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
containerPath := CkJsonObject__stringOf(jResp,'jobs[i].container.linuxParameters.devices[j].containerPath');
hostPath := CkJsonObject__stringOf(jResp,'jobs[i].container.linuxParameters.devices[j].hostPath');
k := 0;
count_k := CkJsonObject_SizeOfArray(jResp,'jobs[i].container.linuxParameters.devices[j].permissions');
while k < count_k do
begin
CkJsonObject_putK(jResp,k);
strVal := CkJsonObject__stringOf(jResp,'jobs[i].container.linuxParameters.devices[j].permissions[k]');
k := k + 1;
end;
j := j + 1;
end;
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'jobs[i].container.linuxParameters.tmpfs');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
containerPath := CkJsonObject__stringOf(jResp,'jobs[i].container.linuxParameters.tmpfs[j].containerPath');
size := CkJsonObject_IntOf(jResp,'jobs[i].container.linuxParameters.tmpfs[j].size');
k := 0;
count_k := CkJsonObject_SizeOfArray(jResp,'jobs[i].container.linuxParameters.tmpfs[j].mountOptions');
while k < count_k do
begin
CkJsonObject_putK(jResp,k);
strVal := CkJsonObject__stringOf(jResp,'jobs[i].container.linuxParameters.tmpfs[j].mountOptions[k]');
k := k + 1;
end;
j := j + 1;
end;
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'jobs[i].container.logConfiguration.secretOptions');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
name := CkJsonObject__stringOf(jResp,'jobs[i].container.logConfiguration.secretOptions[j].name');
valueFrom := CkJsonObject__stringOf(jResp,'jobs[i].container.logConfiguration.secretOptions[j].valueFrom');
j := j + 1;
end;
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'jobs[i].container.mountPoints');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
containerPath := CkJsonObject__stringOf(jResp,'jobs[i].container.mountPoints[j].containerPath');
readOnly := CkJsonObject_IntOf(jResp,'jobs[i].container.mountPoints[j].readOnly');
sourceVolume := CkJsonObject__stringOf(jResp,'jobs[i].container.mountPoints[j].sourceVolume');
j := j + 1;
end;
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'jobs[i].container.networkInterfaces');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
attachmentId := CkJsonObject__stringOf(jResp,'jobs[i].container.networkInterfaces[j].attachmentId');
ipv6Address := CkJsonObject__stringOf(jResp,'jobs[i].container.networkInterfaces[j].ipv6Address');
privateIpv4Address := CkJsonObject__stringOf(jResp,'jobs[i].container.networkInterfaces[j].privateIpv4Address');
j := j + 1;
end;
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'jobs[i].container.resourceRequirements');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
v_type := CkJsonObject__stringOf(jResp,'jobs[i].container.resourceRequirements[j].type');
value := CkJsonObject__stringOf(jResp,'jobs[i].container.resourceRequirements[j].value');
j := j + 1;
end;
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'jobs[i].container.secrets');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
name := CkJsonObject__stringOf(jResp,'jobs[i].container.secrets[j].name');
valueFrom := CkJsonObject__stringOf(jResp,'jobs[i].container.secrets[j].valueFrom');
j := j + 1;
end;
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'jobs[i].container.ulimits');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
hardLimit := CkJsonObject_IntOf(jResp,'jobs[i].container.ulimits[j].hardLimit');
name := CkJsonObject__stringOf(jResp,'jobs[i].container.ulimits[j].name');
softLimit := CkJsonObject_IntOf(jResp,'jobs[i].container.ulimits[j].softLimit');
j := j + 1;
end;
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'jobs[i].container.volumes');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
AccessPointId := CkJsonObject__stringOf(jResp,'jobs[i].container.volumes[j].efsVolumeConfiguration.authorizationConfig.accessPointId');
Iam := CkJsonObject__stringOf(jResp,'jobs[i].container.volumes[j].efsVolumeConfiguration.authorizationConfig.iam');
FileSystemId := CkJsonObject__stringOf(jResp,'jobs[i].container.volumes[j].efsVolumeConfiguration.fileSystemId');
RootDirectory := CkJsonObject__stringOf(jResp,'jobs[i].container.volumes[j].efsVolumeConfiguration.rootDirectory');
TransitEncryption := CkJsonObject__stringOf(jResp,'jobs[i].container.volumes[j].efsVolumeConfiguration.transitEncryption');
TransitEncryptionPort := CkJsonObject_IntOf(jResp,'jobs[i].container.volumes[j].efsVolumeConfiguration.transitEncryptionPort');
SourcePath := CkJsonObject__stringOf(jResp,'jobs[i].container.volumes[j].host.sourcePath');
name := CkJsonObject__stringOf(jResp,'jobs[i].container.volumes[j].name');
j := j + 1;
end;
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'jobs[i].dependsOn');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
jobId := CkJsonObject__stringOf(jResp,'jobs[i].dependsOn[j].jobId');
v_type := CkJsonObject__stringOf(jResp,'jobs[i].dependsOn[j].type');
j := j + 1;
end;
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'jobs[i].nodeProperties.nodeRangeProperties');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
containerExecutionRoleArn := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.executionRoleArn');
FargatePlatformConfigurationPlatformVersion := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.fargatePlatformConfiguration.platformVersion');
containerImage := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.image');
containerInstanceType := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.instanceType');
containerJobRoleArn := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.jobRoleArn');
LinuxParametersInitProcessEnabled := CkJsonObject_IntOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.initProcessEnabled');
LinuxParametersMaxSwap := CkJsonObject_IntOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.maxSwap');
LinuxParametersSharedMemorySize := CkJsonObject_IntOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.sharedMemorySize');
LinuxParametersSwappiness := CkJsonObject_IntOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.swappiness');
LogConfigurationLogDriver := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.logDriver');
OptionsString := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.options.string');
containerMemory := CkJsonObject_IntOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.memory');
NetworkConfigurationAssignPublicIp := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.networkConfiguration.assignPublicIp');
containerPrivileged := CkJsonObject_IntOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.privileged');
containerReadonlyRootFilesystem := CkJsonObject_IntOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.readonlyRootFilesystem');
containerUser := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.user');
containerVcpus := CkJsonObject_IntOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.vcpus');
targetNodes := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].targetNodes');
k := 0;
count_k := CkJsonObject_SizeOfArray(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.command');
while k < count_k do
begin
CkJsonObject_putK(jResp,k);
strVal := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.command[k]');
k := k + 1;
end;
k := 0;
count_k := CkJsonObject_SizeOfArray(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.environment');
while k < count_k do
begin
CkJsonObject_putK(jResp,k);
name := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.environment[k].name');
value := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.environment[k].value');
k := k + 1;
end;
k := 0;
count_k := CkJsonObject_SizeOfArray(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices');
while k < count_k do
begin
CkJsonObject_putK(jResp,k);
containerPath := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k].containerPath');
hostPath := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k].hostPath');
json1 := CkJsonObject_ObjectOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k]');
i1 := 0;
count_i1 := CkJsonObject_SizeOfArray(json1,'permissions');
while i1 < count_i1 do
begin
CkJsonObject_putI(json1,i1);
strVal := CkJsonObject__stringOf(json1,'permissions[i]');
i1 := i1 + 1;
end;
CkJsonObject_Dispose(json1);
k := k + 1;
end;
k := 0;
count_k := CkJsonObject_SizeOfArray(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs');
while k < count_k do
begin
CkJsonObject_putK(jResp,k);
containerPath := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k].containerPath');
size := CkJsonObject_IntOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k].size');
json1 := CkJsonObject_ObjectOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k]');
i1 := 0;
count_i1 := CkJsonObject_SizeOfArray(json1,'mountOptions');
while i1 < count_i1 do
begin
CkJsonObject_putI(json1,i1);
strVal := CkJsonObject__stringOf(json1,'mountOptions[i]');
i1 := i1 + 1;
end;
CkJsonObject_Dispose(json1);
k := k + 1;
end;
k := 0;
count_k := CkJsonObject_SizeOfArray(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions');
while k < count_k do
begin
CkJsonObject_putK(jResp,k);
name := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions[k].name');
valueFrom := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions[k].valueFrom');
k := k + 1;
end;
k := 0;
count_k := CkJsonObject_SizeOfArray(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.mountPoints');
while k < count_k do
begin
CkJsonObject_putK(jResp,k);
containerPath := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].containerPath');
readOnly := CkJsonObject_IntOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].readOnly');
sourceVolume := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].sourceVolume');
k := k + 1;
end;
k := 0;
count_k := CkJsonObject_SizeOfArray(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements');
while k < count_k do
begin
CkJsonObject_putK(jResp,k);
v_type := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements[k].type');
value := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements[k].value');
k := k + 1;
end;
k := 0;
count_k := CkJsonObject_SizeOfArray(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.secrets');
while k < count_k do
begin
CkJsonObject_putK(jResp,k);
name := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.secrets[k].name');
valueFrom := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.secrets[k].valueFrom');
k := k + 1;
end;
k := 0;
count_k := CkJsonObject_SizeOfArray(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.ulimits');
while k < count_k do
begin
CkJsonObject_putK(jResp,k);
hardLimit := CkJsonObject_IntOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].hardLimit');
name := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].name');
softLimit := CkJsonObject_IntOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].softLimit');
k := k + 1;
end;
k := 0;
count_k := CkJsonObject_SizeOfArray(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes');
while k < count_k do
begin
CkJsonObject_putK(jResp,k);
AuthorizationConfigAccessPointId := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.authorizationConfig.accessPointId');
AuthorizationConfigIam := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.authorizationConfig.iam');
efsVolumeConfigurationFileSystemId := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.fileSystemId');
efsVolumeConfigurationRootDirectory := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.rootDirectory');
efsVolumeConfigurationTransitEncryption := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.transitEncryption');
efsVolumeConfigurationTransitEncryptionPort := CkJsonObject_IntOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.transitEncryptionPort');
hostSourcePath := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].host.sourcePath');
name := CkJsonObject__stringOf(jResp,'jobs[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].name');
k := k + 1;
end;
j := j + 1;
end;
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'jobs[i].platformCapabilities');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
strVal := CkJsonObject__stringOf(jResp,'jobs[i].platformCapabilities[j]');
j := j + 1;
end;
j := 0;
count_j := CkJsonObject_SizeOfArray(jResp,'jobs[i].retryStrategy.evaluateOnExit');
while j < count_j do
begin
CkJsonObject_putJ(jResp,j);
action := CkJsonObject__stringOf(jResp,'jobs[i].retryStrategy.evaluateOnExit[j].action');
onExitCode := CkJsonObject__stringOf(jResp,'jobs[i].retryStrategy.evaluateOnExit[j].onExitCode');
onReason := CkJsonObject__stringOf(jResp,'jobs[i].retryStrategy.evaluateOnExit[j].onReason');
onStatusReason := CkJsonObject__stringOf(jResp,'jobs[i].retryStrategy.evaluateOnExit[j].onStatusReason');
j := j + 1;
end;
i := i + 1;
end;
// 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_Dispose(rest);
CkAuthAws_Dispose(authAws);
CkJsonObject_Dispose(json);
CkStringBuilder_Dispose(sbRequestBody);
CkStringBuilder_Dispose(sbResponseBody);
CkJsonObject_Dispose(jResp);