DescribeJobDefinitions C Example
#include <C_CkRest.h>
#include <C_CkAuthAws.h>
#include <C_CkJsonObject.h>
#include <C_CkStringBuilder.h>
void ChilkatSample(void)
{
HCkRest rest;
BOOL success;
HCkAuthAws authAws;
HCkJsonObject json;
HCkStringBuilder sbRequestBody;
HCkStringBuilder sbResponseBody;
int respStatusCode;
HCkJsonObject jResp;
const char *ExecutionRoleArn;
const char *PlatformVersion;
const char *Image;
const char *InstanceType;
const char *JobRoleArn;
int InitProcessEnabled;
int MaxSwap;
int SharedMemorySize;
int Swappiness;
const char *LogDriver;
const char *v_String;
int Memory;
const char *AssignPublicIp;
int Privileged;
int ReadonlyRootFilesystem;
const char *User;
int Vcpus;
const char *jobDefinitionArn;
const char *jobDefinitionName;
int MainNode;
int NumNodes;
const char *parametersString;
int propagateTags;
int Attempts;
int revision;
int schedulingPriority;
const char *status;
const char *tagsString;
int AttemptDurationSeconds;
const char *v_type;
int j;
int count_j;
const char *strVal;
const char *name;
const char *value;
const char *containerPath;
const char *hostPath;
int k;
int count_k;
int size;
const char *valueFrom;
int readOnly;
const char *sourceVolume;
int hardLimit;
int softLimit;
const char *AccessPointId;
const char *Iam;
const char *FileSystemId;
const char *RootDirectory;
const char *TransitEncryption;
int TransitEncryptionPort;
const char *SourcePath;
const char *containerExecutionRoleArn;
const char *FargatePlatformConfigurationPlatformVersion;
const char *containerImage;
const char *containerInstanceType;
const char *containerJobRoleArn;
int LinuxParametersInitProcessEnabled;
int LinuxParametersMaxSwap;
int LinuxParametersSharedMemorySize;
int LinuxParametersSwappiness;
const char *LogConfigurationLogDriver;
const char *OptionsString;
int containerMemory;
const char *NetworkConfigurationAssignPublicIp;
int containerPrivileged;
int containerReadonlyRootFilesystem;
const char *containerUser;
int containerVcpus;
const char *targetNodes;
HCkJsonObject json1;
int i1;
int count_i1;
const char *AuthorizationConfigAccessPointId;
const char *AuthorizationConfigIam;
const char *efsVolumeConfigurationFileSystemId;
const char *efsVolumeConfigurationRootDirectory;
const char *efsVolumeConfigurationTransitEncryption;
int efsVolumeConfigurationTransitEncryptionPort;
const char *hostSourcePath;
const char *action;
const char *onExitCode;
const char *onReason;
const char *onStatusReason;
const char *nextToken;
int i;
int count_i;
// 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) {
printf("ConnectFailReason: %d\n",CkRest_getConnectFailReason(rest));
printf("%s\n",CkRest_lastErrorText(rest));
CkRest_Dispose(rest);
CkAuthAws_Dispose(authAws);
return;
}
// The following code creates the JSON request body.
// The JSON created by this code is shown below.
// Use this online tool to generate code from sample JSON:
// Generate Code to Create JSON
json = CkJsonObject_Create();
CkJsonObject_UpdateString(json,"jobDefinitionName","string");
CkJsonObject_UpdateString(json,"jobDefinitions[0]","string");
CkJsonObject_UpdateInt(json,"maxResults",123);
CkJsonObject_UpdateString(json,"nextToken","string");
CkJsonObject_UpdateString(json,"status","string");
// The JSON request body created by the above code:
// {
// "jobDefinitionName": "string",
// "jobDefinitions": [
// "string"
// ],
// "maxResults": number,
// "nextToken": "string",
// "status": "string"
// }
CkRest_AddHeader(rest,"Content-Type","application/x-amz-json-1.1");
CkRest_AddHeader(rest,"X-Amz-Target","DescribeJobDefinitions");
sbRequestBody = CkStringBuilder_Create();
CkJsonObject_EmitSb(json,sbRequestBody);
sbResponseBody = CkStringBuilder_Create();
success = CkRest_FullRequestSb(rest,"POST","/v1/describejobdefinitions",sbRequestBody,sbResponseBody);
if (success != TRUE) {
printf("%s\n",CkRest_lastErrorText(rest));
CkRest_Dispose(rest);
CkAuthAws_Dispose(authAws);
CkJsonObject_Dispose(json);
CkStringBuilder_Dispose(sbRequestBody);
CkStringBuilder_Dispose(sbResponseBody);
return;
}
respStatusCode = CkRest_getResponseStatusCode(rest);
printf("response status code = %d\n",respStatusCode);
if (respStatusCode != 200) {
printf("Response Header:\n");
printf("%s\n",CkRest_responseHeader(rest));
printf("Response Body:\n");
printf("%s\n",CkStringBuilder_getAsString(sbResponseBody));
CkRest_Dispose(rest);
CkAuthAws_Dispose(authAws);
CkJsonObject_Dispose(json);
CkStringBuilder_Dispose(sbRequestBody);
CkStringBuilder_Dispose(sbResponseBody);
return;
}
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
// Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.
// See this example explaining how this memory should be used: const char * functions.
nextToken = CkJsonObject_stringOf(jResp,"nextToken");
i = 0;
count_i = CkJsonObject_SizeOfArray(jResp,"jobDefinitions");
while (i < count_i) {
CkJsonObject_putI(jResp,i);
ExecutionRoleArn = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.executionRoleArn");
PlatformVersion = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.fargatePlatformConfiguration.platformVersion");
Image = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.image");
InstanceType = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.instanceType");
JobRoleArn = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.jobRoleArn");
InitProcessEnabled = CkJsonObject_IntOf(jResp,"jobDefinitions[i].containerProperties.linuxParameters.initProcessEnabled");
MaxSwap = CkJsonObject_IntOf(jResp,"jobDefinitions[i].containerProperties.linuxParameters.maxSwap");
SharedMemorySize = CkJsonObject_IntOf(jResp,"jobDefinitions[i].containerProperties.linuxParameters.sharedMemorySize");
Swappiness = CkJsonObject_IntOf(jResp,"jobDefinitions[i].containerProperties.linuxParameters.swappiness");
LogDriver = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.logConfiguration.logDriver");
v_String = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.logConfiguration.options.string");
Memory = CkJsonObject_IntOf(jResp,"jobDefinitions[i].containerProperties.memory");
AssignPublicIp = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.networkConfiguration.assignPublicIp");
Privileged = CkJsonObject_IntOf(jResp,"jobDefinitions[i].containerProperties.privileged");
ReadonlyRootFilesystem = CkJsonObject_IntOf(jResp,"jobDefinitions[i].containerProperties.readonlyRootFilesystem");
User = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.user");
Vcpus = CkJsonObject_IntOf(jResp,"jobDefinitions[i].containerProperties.vcpus");
jobDefinitionArn = CkJsonObject_stringOf(jResp,"jobDefinitions[i].jobDefinitionArn");
jobDefinitionName = CkJsonObject_stringOf(jResp,"jobDefinitions[i].jobDefinitionName");
MainNode = CkJsonObject_IntOf(jResp,"jobDefinitions[i].nodeProperties.mainNode");
NumNodes = CkJsonObject_IntOf(jResp,"jobDefinitions[i].nodeProperties.numNodes");
parametersString = CkJsonObject_stringOf(jResp,"jobDefinitions[i].parameters.string");
propagateTags = CkJsonObject_IntOf(jResp,"jobDefinitions[i].propagateTags");
Attempts = CkJsonObject_IntOf(jResp,"jobDefinitions[i].retryStrategy.attempts");
revision = CkJsonObject_IntOf(jResp,"jobDefinitions[i].revision");
schedulingPriority = CkJsonObject_IntOf(jResp,"jobDefinitions[i].schedulingPriority");
status = CkJsonObject_stringOf(jResp,"jobDefinitions[i].status");
tagsString = CkJsonObject_stringOf(jResp,"jobDefinitions[i].tags.string");
AttemptDurationSeconds = CkJsonObject_IntOf(jResp,"jobDefinitions[i].timeout.attemptDurationSeconds");
v_type = CkJsonObject_stringOf(jResp,"jobDefinitions[i].type");
j = 0;
count_j = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].containerProperties.command");
while (j < count_j) {
CkJsonObject_putJ(jResp,j);
strVal = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.command[j]");
j = j + 1;
}
j = 0;
count_j = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].containerProperties.environment");
while (j < count_j) {
CkJsonObject_putJ(jResp,j);
name = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.environment[j].name");
value = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.environment[j].value");
j = j + 1;
}
j = 0;
count_j = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].containerProperties.linuxParameters.devices");
while (j < count_j) {
CkJsonObject_putJ(jResp,j);
containerPath = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.linuxParameters.devices[j].containerPath");
hostPath = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.linuxParameters.devices[j].hostPath");
k = 0;
count_k = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].containerProperties.linuxParameters.devices[j].permissions");
while (k < count_k) {
CkJsonObject_putK(jResp,k);
strVal = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.linuxParameters.devices[j].permissions[k]");
k = k + 1;
}
j = j + 1;
}
j = 0;
count_j = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].containerProperties.linuxParameters.tmpfs");
while (j < count_j) {
CkJsonObject_putJ(jResp,j);
containerPath = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.linuxParameters.tmpfs[j].containerPath");
size = CkJsonObject_IntOf(jResp,"jobDefinitions[i].containerProperties.linuxParameters.tmpfs[j].size");
k = 0;
count_k = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].containerProperties.linuxParameters.tmpfs[j].mountOptions");
while (k < count_k) {
CkJsonObject_putK(jResp,k);
strVal = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.linuxParameters.tmpfs[j].mountOptions[k]");
k = k + 1;
}
j = j + 1;
}
j = 0;
count_j = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].containerProperties.logConfiguration.secretOptions");
while (j < count_j) {
CkJsonObject_putJ(jResp,j);
name = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.logConfiguration.secretOptions[j].name");
valueFrom = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.logConfiguration.secretOptions[j].valueFrom");
j = j + 1;
}
j = 0;
count_j = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].containerProperties.mountPoints");
while (j < count_j) {
CkJsonObject_putJ(jResp,j);
containerPath = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.mountPoints[j].containerPath");
readOnly = CkJsonObject_IntOf(jResp,"jobDefinitions[i].containerProperties.mountPoints[j].readOnly");
sourceVolume = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.mountPoints[j].sourceVolume");
j = j + 1;
}
j = 0;
count_j = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].containerProperties.resourceRequirements");
while (j < count_j) {
CkJsonObject_putJ(jResp,j);
v_type = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.resourceRequirements[j].type");
value = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.resourceRequirements[j].value");
j = j + 1;
}
j = 0;
count_j = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].containerProperties.secrets");
while (j < count_j) {
CkJsonObject_putJ(jResp,j);
name = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.secrets[j].name");
valueFrom = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.secrets[j].valueFrom");
j = j + 1;
}
j = 0;
count_j = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].containerProperties.ulimits");
while (j < count_j) {
CkJsonObject_putJ(jResp,j);
hardLimit = CkJsonObject_IntOf(jResp,"jobDefinitions[i].containerProperties.ulimits[j].hardLimit");
name = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.ulimits[j].name");
softLimit = CkJsonObject_IntOf(jResp,"jobDefinitions[i].containerProperties.ulimits[j].softLimit");
j = j + 1;
}
j = 0;
count_j = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].containerProperties.volumes");
while (j < count_j) {
CkJsonObject_putJ(jResp,j);
AccessPointId = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.volumes[j].efsVolumeConfiguration.authorizationConfig.accessPointId");
Iam = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.volumes[j].efsVolumeConfiguration.authorizationConfig.iam");
FileSystemId = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.volumes[j].efsVolumeConfiguration.fileSystemId");
RootDirectory = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.volumes[j].efsVolumeConfiguration.rootDirectory");
TransitEncryption = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.volumes[j].efsVolumeConfiguration.transitEncryption");
TransitEncryptionPort = CkJsonObject_IntOf(jResp,"jobDefinitions[i].containerProperties.volumes[j].efsVolumeConfiguration.transitEncryptionPort");
SourcePath = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.volumes[j].host.sourcePath");
name = CkJsonObject_stringOf(jResp,"jobDefinitions[i].containerProperties.volumes[j].name");
j = j + 1;
}
j = 0;
count_j = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties");
while (j < count_j) {
CkJsonObject_putJ(jResp,j);
containerExecutionRoleArn = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.executionRoleArn");
FargatePlatformConfigurationPlatformVersion = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.fargatePlatformConfiguration.platformVersion");
containerImage = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.image");
containerInstanceType = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.instanceType");
containerJobRoleArn = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.jobRoleArn");
LinuxParametersInitProcessEnabled = CkJsonObject_IntOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.initProcessEnabled");
LinuxParametersMaxSwap = CkJsonObject_IntOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.maxSwap");
LinuxParametersSharedMemorySize = CkJsonObject_IntOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.sharedMemorySize");
LinuxParametersSwappiness = CkJsonObject_IntOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.swappiness");
LogConfigurationLogDriver = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.logDriver");
OptionsString = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.options.string");
containerMemory = CkJsonObject_IntOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.memory");
NetworkConfigurationAssignPublicIp = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.networkConfiguration.assignPublicIp");
containerPrivileged = CkJsonObject_IntOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.privileged");
containerReadonlyRootFilesystem = CkJsonObject_IntOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.readonlyRootFilesystem");
containerUser = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.user");
containerVcpus = CkJsonObject_IntOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.vcpus");
targetNodes = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].targetNodes");
k = 0;
count_k = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.command");
while (k < count_k) {
CkJsonObject_putK(jResp,k);
strVal = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.command[k]");
k = k + 1;
}
k = 0;
count_k = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.environment");
while (k < count_k) {
CkJsonObject_putK(jResp,k);
name = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.environment[k].name");
value = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.environment[k].value");
k = k + 1;
}
k = 0;
count_k = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices");
while (k < count_k) {
CkJsonObject_putK(jResp,k);
containerPath = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k].containerPath");
hostPath = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k].hostPath");
json1 = CkJsonObject_ObjectOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.devices[k]");
i1 = 0;
count_i1 = CkJsonObject_SizeOfArray(json1,"permissions");
while (i1 < count_i1) {
CkJsonObject_putI(json1,i1);
strVal = CkJsonObject_stringOf(json1,"permissions[i]");
i1 = i1 + 1;
}
CkJsonObject_Dispose(json1);
k = k + 1;
}
k = 0;
count_k = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs");
while (k < count_k) {
CkJsonObject_putK(jResp,k);
containerPath = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k].containerPath");
size = CkJsonObject_IntOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k].size");
json1 = CkJsonObject_ObjectOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.linuxParameters.tmpfs[k]");
i1 = 0;
count_i1 = CkJsonObject_SizeOfArray(json1,"mountOptions");
while (i1 < count_i1) {
CkJsonObject_putI(json1,i1);
strVal = CkJsonObject_stringOf(json1,"mountOptions[i]");
i1 = i1 + 1;
}
CkJsonObject_Dispose(json1);
k = k + 1;
}
k = 0;
count_k = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions");
while (k < count_k) {
CkJsonObject_putK(jResp,k);
name = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions[k].name");
valueFrom = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.logConfiguration.secretOptions[k].valueFrom");
k = k + 1;
}
k = 0;
count_k = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.mountPoints");
while (k < count_k) {
CkJsonObject_putK(jResp,k);
containerPath = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].containerPath");
readOnly = CkJsonObject_IntOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].readOnly");
sourceVolume = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.mountPoints[k].sourceVolume");
k = k + 1;
}
k = 0;
count_k = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements");
while (k < count_k) {
CkJsonObject_putK(jResp,k);
v_type = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements[k].type");
value = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.resourceRequirements[k].value");
k = k + 1;
}
k = 0;
count_k = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.secrets");
while (k < count_k) {
CkJsonObject_putK(jResp,k);
name = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.secrets[k].name");
valueFrom = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.secrets[k].valueFrom");
k = k + 1;
}
k = 0;
count_k = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.ulimits");
while (k < count_k) {
CkJsonObject_putK(jResp,k);
hardLimit = CkJsonObject_IntOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].hardLimit");
name = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].name");
softLimit = CkJsonObject_IntOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.ulimits[k].softLimit");
k = k + 1;
}
k = 0;
count_k = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes");
while (k < count_k) {
CkJsonObject_putK(jResp,k);
AuthorizationConfigAccessPointId = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.authorizationConfig.accessPointId");
AuthorizationConfigIam = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.authorizationConfig.iam");
efsVolumeConfigurationFileSystemId = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.fileSystemId");
efsVolumeConfigurationRootDirectory = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.rootDirectory");
efsVolumeConfigurationTransitEncryption = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.transitEncryption");
efsVolumeConfigurationTransitEncryptionPort = CkJsonObject_IntOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].efsVolumeConfiguration.transitEncryptionPort");
hostSourcePath = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].host.sourcePath");
name = CkJsonObject_stringOf(jResp,"jobDefinitions[i].nodeProperties.nodeRangeProperties[j].container.volumes[k].name");
k = k + 1;
}
j = j + 1;
}
j = 0;
count_j = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].platformCapabilities");
while (j < count_j) {
CkJsonObject_putJ(jResp,j);
strVal = CkJsonObject_stringOf(jResp,"jobDefinitions[i].platformCapabilities[j]");
j = j + 1;
}
j = 0;
count_j = CkJsonObject_SizeOfArray(jResp,"jobDefinitions[i].retryStrategy.evaluateOnExit");
while (j < count_j) {
CkJsonObject_putJ(jResp,j);
action = CkJsonObject_stringOf(jResp,"jobDefinitions[i].retryStrategy.evaluateOnExit[j].action");
onExitCode = CkJsonObject_stringOf(jResp,"jobDefinitions[i].retryStrategy.evaluateOnExit[j].onExitCode");
onReason = CkJsonObject_stringOf(jResp,"jobDefinitions[i].retryStrategy.evaluateOnExit[j].onReason");
onStatusReason = CkJsonObject_stringOf(jResp,"jobDefinitions[i].retryStrategy.evaluateOnExit[j].onStatusReason");
j = j + 1;
}
i = i + 1;
}
// A sample JSON response body parsed by the above code:
// {
// "jobDefinitions": [
// {
// "containerProperties": {
// "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"
// }
// ]
// },
// "jobDefinitionArn": "string",
// "jobDefinitionName": "string",
// "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"
// }
// ]
// },
// "revision": number,
// "schedulingPriority": number,
// "status": "string",
// "tags": {
// "string": "string"
// },
// "timeout": {
// "attemptDurationSeconds": number
// },
// "type": "string"
// }
// ],
// "nextToken": "string"
// }
CkRest_Dispose(rest);
CkAuthAws_Dispose(authAws);
CkJsonObject_Dispose(json);
CkStringBuilder_Dispose(sbRequestBody);
CkStringBuilder_Dispose(sbResponseBody);
CkJsonObject_Dispose(jResp);
}