GetImage 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 "imagebuilder"
# SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
CkRest_SetAuthAws $rest $authAws
# URL: https://imagebuilder.us-west-2.amazonaws.com/
# Use the same region as specified above.
set success [CkRest_Connect $rest "imagebuilder.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
}
CkRest_AddHeader $rest "Content-Type" "application/x-amz-json-1.1"
CkRest_AddHeader $rest "X-Amz-Target" "GetImage"
set sbResponseBody [new_CkStringBuilder]
set success [CkRest_FullRequestNoBodySb $rest "GET" "/GetImage" $sbResponseBody]
if {$success != 1} then {
puts [CkRest_lastErrorText $rest]
delete_CkRest $rest
delete_CkAuthAws $authAws
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_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
set Arn [CkJsonObject_stringOf $jResp "image.arn"]
set BuildType [CkJsonObject_stringOf $jResp "image.buildType"]
set ContainerRecipeArn [CkJsonObject_stringOf $jResp "image.containerRecipe.arn"]
set ContainerType [CkJsonObject_stringOf $jResp "image.containerRecipe.containerType"]
set DateCreated [CkJsonObject_stringOf $jResp "image.containerRecipe.dateCreated"]
set Description [CkJsonObject_stringOf $jResp "image.containerRecipe.description"]
set DockerfileTemplateData [CkJsonObject_stringOf $jResp "image.containerRecipe.dockerfileTemplateData"]
set Encrypted [CkJsonObject_IntOf $jResp "image.containerRecipe.encrypted"]
set Image [CkJsonObject_stringOf $jResp "image.containerRecipe.instanceConfiguration.image"]
set KmsKeyId [CkJsonObject_stringOf $jResp "image.containerRecipe.kmsKeyId"]
set Name [CkJsonObject_stringOf $jResp "image.containerRecipe.name"]
set Owner [CkJsonObject_stringOf $jResp "image.containerRecipe.owner"]
set ParentImage [CkJsonObject_stringOf $jResp "image.containerRecipe.parentImage"]
set Platform [CkJsonObject_stringOf $jResp "image.containerRecipe.platform"]
set v_String [CkJsonObject_stringOf $jResp "image.containerRecipe.tags.string"]
set RepositoryName [CkJsonObject_stringOf $jResp "image.containerRecipe.targetRepository.repositoryName"]
set Service [CkJsonObject_stringOf $jResp "image.containerRecipe.targetRepository.service"]
set Version [CkJsonObject_stringOf $jResp "image.containerRecipe.version"]
set WorkingDirectory [CkJsonObject_stringOf $jResp "image.containerRecipe.workingDirectory"]
set imageDateCreated [CkJsonObject_stringOf $jResp "image.dateCreated"]
set DistributionConfigurationArn [CkJsonObject_stringOf $jResp "image.distributionConfiguration.arn"]
set DistributionConfigurationDateCreated [CkJsonObject_stringOf $jResp "image.distributionConfiguration.dateCreated"]
set DateUpdated [CkJsonObject_stringOf $jResp "image.distributionConfiguration.dateUpdated"]
set DistributionConfigurationDescription [CkJsonObject_stringOf $jResp "image.distributionConfiguration.description"]
set DistributionConfigurationName [CkJsonObject_stringOf $jResp "image.distributionConfiguration.name"]
set TagsString [CkJsonObject_stringOf $jResp "image.distributionConfiguration.tags.string"]
set TimeoutMinutes [CkJsonObject_IntOf $jResp "image.distributionConfiguration.timeoutMinutes"]
set EnhancedImageMetadataEnabled [CkJsonObject_IntOf $jResp "image.enhancedImageMetadataEnabled"]
set UninstallAfterBuild [CkJsonObject_IntOf $jResp "image.imageRecipe.additionalInstanceConfiguration.systemsManagerAgent.uninstallAfterBuild"]
set UserDataOverride [CkJsonObject_stringOf $jResp "image.imageRecipe.additionalInstanceConfiguration.userDataOverride"]
set ImageRecipeArn [CkJsonObject_stringOf $jResp "image.imageRecipe.arn"]
set ImageRecipeDateCreated [CkJsonObject_stringOf $jResp "image.imageRecipe.dateCreated"]
set ImageRecipeDescription [CkJsonObject_stringOf $jResp "image.imageRecipe.description"]
set ImageRecipeName [CkJsonObject_stringOf $jResp "image.imageRecipe.name"]
set ImageRecipeOwner [CkJsonObject_stringOf $jResp "image.imageRecipe.owner"]
set ImageRecipeParentImage [CkJsonObject_stringOf $jResp "image.imageRecipe.parentImage"]
set ImageRecipePlatform [CkJsonObject_stringOf $jResp "image.imageRecipe.platform"]
set TagsString [CkJsonObject_stringOf $jResp "image.imageRecipe.tags.string"]
set v_Type [CkJsonObject_stringOf $jResp "image.imageRecipe.type"]
set ImageRecipeVersion [CkJsonObject_stringOf $jResp "image.imageRecipe.version"]
set ImageRecipeWorkingDirectory [CkJsonObject_stringOf $jResp "image.imageRecipe.workingDirectory"]
set ImageTestsEnabled [CkJsonObject_IntOf $jResp "image.imageTestsConfiguration.imageTestsEnabled"]
set ImageTestsConfigurationTimeoutMinutes [CkJsonObject_IntOf $jResp "image.imageTestsConfiguration.timeoutMinutes"]
set InfrastructureConfigurationArn [CkJsonObject_stringOf $jResp "image.infrastructureConfiguration.arn"]
set InfrastructureConfigurationDateCreated [CkJsonObject_stringOf $jResp "image.infrastructureConfiguration.dateCreated"]
set InfrastructureConfigurationDateUpdated [CkJsonObject_stringOf $jResp "image.infrastructureConfiguration.dateUpdated"]
set InfrastructureConfigurationDescription [CkJsonObject_stringOf $jResp "image.infrastructureConfiguration.description"]
set HttpPutResponseHopLimit [CkJsonObject_IntOf $jResp "image.infrastructureConfiguration.instanceMetadataOptions.httpPutResponseHopLimit"]
set HttpTokens [CkJsonObject_stringOf $jResp "image.infrastructureConfiguration.instanceMetadataOptions.httpTokens"]
set InstanceProfileName [CkJsonObject_stringOf $jResp "image.infrastructureConfiguration.instanceProfileName"]
set KeyPair [CkJsonObject_stringOf $jResp "image.infrastructureConfiguration.keyPair"]
set S3BucketName [CkJsonObject_stringOf $jResp "image.infrastructureConfiguration.logging.s3Logs.s3BucketName"]
set S3KeyPrefix [CkJsonObject_stringOf $jResp "image.infrastructureConfiguration.logging.s3Logs.s3KeyPrefix"]
set InfrastructureConfigurationName [CkJsonObject_stringOf $jResp "image.infrastructureConfiguration.name"]
set ResourceTagsString [CkJsonObject_stringOf $jResp "image.infrastructureConfiguration.resourceTags.string"]
set SnsTopicArn [CkJsonObject_stringOf $jResp "image.infrastructureConfiguration.snsTopicArn"]
set SubnetId [CkJsonObject_stringOf $jResp "image.infrastructureConfiguration.subnetId"]
set TagsString [CkJsonObject_stringOf $jResp "image.infrastructureConfiguration.tags.string"]
set TerminateInstanceOnFailure [CkJsonObject_IntOf $jResp "image.infrastructureConfiguration.terminateInstanceOnFailure"]
set imageName [CkJsonObject_stringOf $jResp "image.name"]
set OsVersion [CkJsonObject_stringOf $jResp "image.osVersion"]
set imagePlatform [CkJsonObject_stringOf $jResp "image.platform"]
set SourcePipelineArn [CkJsonObject_stringOf $jResp "image.sourcePipelineArn"]
set SourcePipelineName [CkJsonObject_stringOf $jResp "image.sourcePipelineName"]
set Reason [CkJsonObject_stringOf $jResp "image.state.reason"]
set Status [CkJsonObject_stringOf $jResp "image.state.status"]
set TagsString [CkJsonObject_stringOf $jResp "image.tags.string"]
set imageType [CkJsonObject_stringOf $jResp "image.type"]
set imageVersion [CkJsonObject_stringOf $jResp "image.version"]
set requestId [CkJsonObject_stringOf $jResp "requestId"]
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "image.containerRecipe.components"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set componentArn [CkJsonObject_stringOf $jResp "image.containerRecipe.components[i].componentArn"]
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "image.containerRecipe.components[i].parameters"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set name [CkJsonObject_stringOf $jResp "image.containerRecipe.components[i].parameters[j].name"]
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "image.containerRecipe.components[i].parameters[j].value"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set strVal [CkJsonObject_stringOf $jResp "image.containerRecipe.components[i].parameters[j].value[k]"]
set k [expr $k + 1]
}
set j [expr $j + 1]
}
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set deviceName [CkJsonObject_stringOf $jResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].deviceName"]
set DeleteOnTermination [CkJsonObject_IntOf $jResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.deleteOnTermination"]
set ebsEncrypted [CkJsonObject_IntOf $jResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.encrypted"]
set Iops [CkJsonObject_IntOf $jResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.iops"]
set ebsKmsKeyId [CkJsonObject_stringOf $jResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.kmsKeyId"]
set SnapshotId [CkJsonObject_stringOf $jResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.snapshotId"]
set Throughput [CkJsonObject_IntOf $jResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.throughput"]
set VolumeSize [CkJsonObject_IntOf $jResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.volumeSize"]
set VolumeType [CkJsonObject_stringOf $jResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.volumeType"]
set noDevice [CkJsonObject_stringOf $jResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].noDevice"]
set virtualName [CkJsonObject_stringOf $jResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].virtualName"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "image.distributionConfiguration.distributions"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set AmiTagsString [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.amiTags.string"]
set amiDistributionConfigurationDescription [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.description"]
set amiDistributionConfigurationKmsKeyId [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.kmsKeyId"]
set amiDistributionConfigurationName [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.name"]
set containerDistributionConfigurationDescription [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].containerDistributionConfiguration.description"]
set TargetRepositoryRepositoryName [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].containerDistributionConfiguration.targetRepository.repositoryName"]
set TargetRepositoryService [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].containerDistributionConfiguration.targetRepository.service"]
set region [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].region"]
set DiskImageFormat [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].s3ExportConfiguration.diskImageFormat"]
set RoleName [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].s3ExportConfiguration.roleName"]
set S3Bucket [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].s3ExportConfiguration.s3Bucket"]
set S3Prefix [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].s3ExportConfiguration.s3Prefix"]
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationalUnitArns"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationalUnitArns[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationArns"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationArns[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userGroups"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userGroups[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userIds"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userIds[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.targetAccountIds"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.targetAccountIds[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "image.distributionConfiguration.distributions[i].containerDistributionConfiguration.containerTags"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].containerDistributionConfiguration.containerTags[j]"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "image.distributionConfiguration.distributions[i].fastLaunchConfigurations"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set accountId [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].accountId"]
set enabled [CkJsonObject_IntOf $jResp "image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].enabled"]
set LaunchTemplateId [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].launchTemplate.launchTemplateId"]
set LaunchTemplateName [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].launchTemplate.launchTemplateName"]
set LaunchTemplateVersion [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].launchTemplate.launchTemplateVersion"]
set maxParallelLaunches [CkJsonObject_IntOf $jResp "image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].maxParallelLaunches"]
set TargetResourceCount [CkJsonObject_IntOf $jResp "image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].snapshotConfiguration.targetResourceCount"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "image.distributionConfiguration.distributions[i].launchTemplateConfigurations"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set accountId [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].launchTemplateConfigurations[j].accountId"]
set launchTemplateId [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].launchTemplateConfigurations[j].launchTemplateId"]
set setDefaultVersion [CkJsonObject_IntOf $jResp "image.distributionConfiguration.distributions[i].launchTemplateConfigurations[j].setDefaultVersion"]
set j [expr $j + 1]
}
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "image.distributionConfiguration.distributions[i].licenseConfigurationArns"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "image.distributionConfiguration.distributions[i].licenseConfigurationArns[j]"]
set j [expr $j + 1]
}
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "image.imageRecipe.blockDeviceMappings"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set deviceName [CkJsonObject_stringOf $jResp "image.imageRecipe.blockDeviceMappings[i].deviceName"]
set ebsDeleteOnTermination [CkJsonObject_IntOf $jResp "image.imageRecipe.blockDeviceMappings[i].ebs.deleteOnTermination"]
set ebsEncrypted [CkJsonObject_IntOf $jResp "image.imageRecipe.blockDeviceMappings[i].ebs.encrypted"]
set ebsIops [CkJsonObject_IntOf $jResp "image.imageRecipe.blockDeviceMappings[i].ebs.iops"]
set ebsKmsKeyId [CkJsonObject_stringOf $jResp "image.imageRecipe.blockDeviceMappings[i].ebs.kmsKeyId"]
set ebsSnapshotId [CkJsonObject_stringOf $jResp "image.imageRecipe.blockDeviceMappings[i].ebs.snapshotId"]
set ebsThroughput [CkJsonObject_IntOf $jResp "image.imageRecipe.blockDeviceMappings[i].ebs.throughput"]
set ebsVolumeSize [CkJsonObject_IntOf $jResp "image.imageRecipe.blockDeviceMappings[i].ebs.volumeSize"]
set ebsVolumeType [CkJsonObject_stringOf $jResp "image.imageRecipe.blockDeviceMappings[i].ebs.volumeType"]
set noDevice [CkJsonObject_stringOf $jResp "image.imageRecipe.blockDeviceMappings[i].noDevice"]
set virtualName [CkJsonObject_stringOf $jResp "image.imageRecipe.blockDeviceMappings[i].virtualName"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "image.imageRecipe.components"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set componentArn [CkJsonObject_stringOf $jResp "image.imageRecipe.components[i].componentArn"]
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "image.imageRecipe.components[i].parameters"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set name [CkJsonObject_stringOf $jResp "image.imageRecipe.components[i].parameters[j].name"]
set k 0
set count_k [CkJsonObject_SizeOfArray $jResp "image.imageRecipe.components[i].parameters[j].value"]
while {$k < $count_k} {
CkJsonObject_put_K $jResp $k
set strVal [CkJsonObject_stringOf $jResp "image.imageRecipe.components[i].parameters[j].value[k]"]
set k [expr $k + 1]
}
set j [expr $j + 1]
}
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "image.infrastructureConfiguration.instanceTypes"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set strVal [CkJsonObject_stringOf $jResp "image.infrastructureConfiguration.instanceTypes[i]"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "image.infrastructureConfiguration.securityGroupIds"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set strVal [CkJsonObject_stringOf $jResp "image.infrastructureConfiguration.securityGroupIds[i]"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "image.outputResources.amis"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set accountId [CkJsonObject_stringOf $jResp "image.outputResources.amis[i].accountId"]
set description [CkJsonObject_stringOf $jResp "image.outputResources.amis[i].description"]
set image [CkJsonObject_stringOf $jResp "image.outputResources.amis[i].image"]
set name [CkJsonObject_stringOf $jResp "image.outputResources.amis[i].name"]
set region [CkJsonObject_stringOf $jResp "image.outputResources.amis[i].region"]
set stateReason [CkJsonObject_stringOf $jResp "image.outputResources.amis[i].state.reason"]
set stateStatus [CkJsonObject_stringOf $jResp "image.outputResources.amis[i].state.status"]
set i [expr $i + 1]
}
set i 0
set count_i [CkJsonObject_SizeOfArray $jResp "image.outputResources.containers"]
while {$i < $count_i} {
CkJsonObject_put_I $jResp $i
set region [CkJsonObject_stringOf $jResp "image.outputResources.containers[i].region"]
set j 0
set count_j [CkJsonObject_SizeOfArray $jResp "image.outputResources.containers[i].imageUris"]
while {$j < $count_j} {
CkJsonObject_put_J $jResp $j
set strVal [CkJsonObject_stringOf $jResp "image.outputResources.containers[i].imageUris[j]"]
set j [expr $j + 1]
}
set i [expr $i + 1]
}
# A sample JSON response body parsed by the above code:
# {
# "image": {
# "arn": "string",
# "buildType": "string",
# "containerRecipe": {
# "arn": "string",
# "components": [
# {
# "componentArn": "string",
# "parameters": [
# {
# "name": "string",
# "value": [
# "string"
# ]
# }
# ]
# }
# ],
# "containerType": "string",
# "dateCreated": "string",
# "description": "string",
# "dockerfileTemplateData": "string",
# "encrypted": boolean,
# "instanceConfiguration": {
# "blockDeviceMappings": [
# {
# "deviceName": "string",
# "ebs": {
# "deleteOnTermination": boolean,
# "encrypted": boolean,
# "iops": number,
# "kmsKeyId": "string",
# "snapshotId": "string",
# "throughput": number,
# "volumeSize": number,
# "volumeType": "string"
# },
# "noDevice": "string",
# "virtualName": "string"
# }
# ],
# "image": "string"
# },
# "kmsKeyId": "string",
# "name": "string",
# "owner": "string",
# "parentImage": "string",
# "platform": "string",
# "tags": {
# "string": "string"
# },
# "targetRepository": {
# "repositoryName": "string",
# "service": "string"
# },
# "version": "string",
# "workingDirectory": "string"
# },
# "dateCreated": "string",
# "distributionConfiguration": {
# "arn": "string",
# "dateCreated": "string",
# "dateUpdated": "string",
# "description": "string",
# "distributions": [
# {
# "amiDistributionConfiguration": {
# "amiTags": {
# "string": "string"
# },
# "description": "string",
# "kmsKeyId": "string",
# "launchPermission": {
# "organizationalUnitArns": [
# "string"
# ],
# "organizationArns": [
# "string"
# ],
# "userGroups": [
# "string"
# ],
# "userIds": [
# "string"
# ]
# },
# "name": "string",
# "targetAccountIds": [
# "string"
# ]
# },
# "containerDistributionConfiguration": {
# "containerTags": [
# "string"
# ],
# "description": "string",
# "targetRepository": {
# "repositoryName": "string",
# "service": "string"
# }
# },
# "fastLaunchConfigurations": [
# {
# "accountId": "string",
# "enabled": boolean,
# "launchTemplate": {
# "launchTemplateId": "string",
# "launchTemplateName": "string",
# "launchTemplateVersion": "string"
# },
# "maxParallelLaunches": number,
# "snapshotConfiguration": {
# "targetResourceCount": number
# }
# }
# ],
# "launchTemplateConfigurations": [
# {
# "accountId": "string",
# "launchTemplateId": "string",
# "setDefaultVersion": boolean
# }
# ],
# "licenseConfigurationArns": [
# "string"
# ],
# "region": "string",
# "s3ExportConfiguration": {
# "diskImageFormat": "string",
# "roleName": "string",
# "s3Bucket": "string",
# "s3Prefix": "string"
# }
# }
# ],
# "name": "string",
# "tags": {
# "string": "string"
# },
# "timeoutMinutes": number
# },
# "enhancedImageMetadataEnabled": boolean,
# "imageRecipe": {
# "additionalInstanceConfiguration": {
# "systemsManagerAgent": {
# "uninstallAfterBuild": boolean
# },
# "userDataOverride": "string"
# },
# "arn": "string",
# "blockDeviceMappings": [
# {
# "deviceName": "string",
# "ebs": {
# "deleteOnTermination": boolean,
# "encrypted": boolean,
# "iops": number,
# "kmsKeyId": "string",
# "snapshotId": "string",
# "throughput": number,
# "volumeSize": number,
# "volumeType": "string"
# },
# "noDevice": "string",
# "virtualName": "string"
# }
# ],
# "components": [
# {
# "componentArn": "string",
# "parameters": [
# {
# "name": "string",
# "value": [
# "string"
# ]
# }
# ]
# }
# ],
# "dateCreated": "string",
# "description": "string",
# "name": "string",
# "owner": "string",
# "parentImage": "string",
# "platform": "string",
# "tags": {
# "string": "string"
# },
# "type": "string",
# "version": "string",
# "workingDirectory": "string"
# },
# "imageTestsConfiguration": {
# "imageTestsEnabled": boolean,
# "timeoutMinutes": number
# },
# "infrastructureConfiguration": {
# "arn": "string",
# "dateCreated": "string",
# "dateUpdated": "string",
# "description": "string",
# "instanceMetadataOptions": {
# "httpPutResponseHopLimit": number,
# "httpTokens": "string"
# },
# "instanceProfileName": "string",
# "instanceTypes": [
# "string"
# ],
# "keyPair": "string",
# "logging": {
# "s3Logs": {
# "s3BucketName": "string",
# "s3KeyPrefix": "string"
# }
# },
# "name": "string",
# "resourceTags": {
# "string": "string"
# },
# "securityGroupIds": [
# "string"
# ],
# "snsTopicArn": "string",
# "subnetId": "string",
# "tags": {
# "string": "string"
# },
# "terminateInstanceOnFailure": boolean
# },
# "name": "string",
# "osVersion": "string",
# "outputResources": {
# "amis": [
# {
# "accountId": "string",
# "description": "string",
# "image": "string",
# "name": "string",
# "region": "string",
# "state": {
# "reason": "string",
# "status": "string"
# }
# }
# ],
# "containers": [
# {
# "imageUris": [
# "string"
# ],
# "region": "string"
# }
# ]
# },
# "platform": "string",
# "sourcePipelineArn": "string",
# "sourcePipelineName": "string",
# "state": {
# "reason": "string",
# "status": "string"
# },
# "tags": {
# "string": "string"
# },
# "type": "string",
# "version": "string"
# },
# "requestId": "string"
# }
delete_CkRest $rest
delete_CkAuthAws $authAws
delete_CkStringBuilder $sbResponseBody
delete_CkJsonObject $jResp