Chilkat Online Tools

GetImage unicodeCpp Example

EC2 Image Builder

#include <CkRestW.h>
#include <CkAuthAwsW.h>
#include <CkStringBuilderW.h>
#include <CkJsonObjectW.h>

void ChilkatSample(void)
    {
    // This example requires the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    CkRestW rest;
    bool success;

    CkAuthAwsW authAws;
    authAws.put_AccessKey(L"AWS_ACCESS_KEY");
    authAws.put_SecretKey(L"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.put_Region(L"us-west-2");
    authAws.put_ServiceName(L"imagebuilder");
    // SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
    rest.SetAuthAws(authAws);

    // URL: https://imagebuilder.us-west-2.amazonaws.com/
    // Use the same region as specified above.
    success = rest.Connect(L"imagebuilder.us-west-2.amazonaws.com",443,true,true);
    if (success != true) {
        wprintf(L"ConnectFailReason: %d\n",rest.get_ConnectFailReason());
        wprintf(L"%s\n",rest.lastErrorText());
        return;
    }

    rest.AddHeader(L"Content-Type",L"application/x-amz-json-1.1");
    rest.AddHeader(L"X-Amz-Target",L"GetImage");

    CkStringBuilderW sbResponseBody;
    success = rest.FullRequestNoBodySb(L"GET",L"/GetImage",sbResponseBody);
    if (success != true) {
        wprintf(L"%s\n",rest.lastErrorText());
        return;
    }

    int respStatusCode = rest.get_ResponseStatusCode();
    wprintf(L"response status code = %d\n",respStatusCode);
    if (respStatusCode != 200) {
        wprintf(L"Response Header:\n");
        wprintf(L"%s\n",rest.responseHeader());
        wprintf(L"Response Body:\n");
        wprintf(L"%s\n",sbResponseBody.getAsString());
        return;
    }

    CkJsonObjectW jResp;
    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

    // 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.

    const wchar_t *componentArn = 0;
    int j;
    int count_j;
    const wchar_t *name = 0;
    int k;
    int count_k;
    const wchar_t *strVal = 0;
    const wchar_t *deviceName = 0;
    int DeleteOnTermination;
    int ebsEncrypted;
    int Iops;
    const wchar_t *ebsKmsKeyId = 0;
    const wchar_t *SnapshotId = 0;
    int Throughput;
    int VolumeSize;
    const wchar_t *VolumeType = 0;
    const wchar_t *noDevice = 0;
    const wchar_t *virtualName = 0;
    const wchar_t *AmiTagsString = 0;
    const wchar_t *amiDistributionConfigurationDescription = 0;
    const wchar_t *amiDistributionConfigurationKmsKeyId = 0;
    const wchar_t *amiDistributionConfigurationName = 0;
    const wchar_t *containerDistributionConfigurationDescription = 0;
    const wchar_t *TargetRepositoryRepositoryName = 0;
    const wchar_t *TargetRepositoryService = 0;
    const wchar_t *region = 0;
    const wchar_t *DiskImageFormat = 0;
    const wchar_t *RoleName = 0;
    const wchar_t *S3Bucket = 0;
    const wchar_t *S3Prefix = 0;
    const wchar_t *accountId = 0;
    int enabled;
    const wchar_t *LaunchTemplateId = 0;
    const wchar_t *LaunchTemplateName = 0;
    const wchar_t *LaunchTemplateVersion = 0;
    int maxParallelLaunches;
    int TargetResourceCount;
    const wchar_t *launchTemplateId = 0;
    int setDefaultVersion;
    int ebsDeleteOnTermination;
    int ebsIops;
    const wchar_t *ebsSnapshotId = 0;
    int ebsThroughput;
    int ebsVolumeSize;
    const wchar_t *ebsVolumeType = 0;
    const wchar_t *description = 0;
    const wchar_t *image = 0;
    const wchar_t *stateReason = 0;
    const wchar_t *stateStatus = 0;

    const wchar_t *Arn = jResp.stringOf(L"image.arn");
    const wchar_t *BuildType = jResp.stringOf(L"image.buildType");
    const wchar_t *ContainerRecipeArn = jResp.stringOf(L"image.containerRecipe.arn");
    const wchar_t *ContainerType = jResp.stringOf(L"image.containerRecipe.containerType");
    const wchar_t *DateCreated = jResp.stringOf(L"image.containerRecipe.dateCreated");
    const wchar_t *Description = jResp.stringOf(L"image.containerRecipe.description");
    const wchar_t *DockerfileTemplateData = jResp.stringOf(L"image.containerRecipe.dockerfileTemplateData");
    int Encrypted = jResp.IntOf(L"image.containerRecipe.encrypted");
    const wchar_t *Image = jResp.stringOf(L"image.containerRecipe.instanceConfiguration.image");
    const wchar_t *KmsKeyId = jResp.stringOf(L"image.containerRecipe.kmsKeyId");
    const wchar_t *Name = jResp.stringOf(L"image.containerRecipe.name");
    const wchar_t *Owner = jResp.stringOf(L"image.containerRecipe.owner");
    const wchar_t *ParentImage = jResp.stringOf(L"image.containerRecipe.parentImage");
    const wchar_t *Platform = jResp.stringOf(L"image.containerRecipe.platform");
    const wchar_t *v_String = jResp.stringOf(L"image.containerRecipe.tags.string");
    const wchar_t *RepositoryName = jResp.stringOf(L"image.containerRecipe.targetRepository.repositoryName");
    const wchar_t *Service = jResp.stringOf(L"image.containerRecipe.targetRepository.service");
    const wchar_t *Version = jResp.stringOf(L"image.containerRecipe.version");
    const wchar_t *WorkingDirectory = jResp.stringOf(L"image.containerRecipe.workingDirectory");
    const wchar_t *imageDateCreated = jResp.stringOf(L"image.dateCreated");
    const wchar_t *DistributionConfigurationArn = jResp.stringOf(L"image.distributionConfiguration.arn");
    const wchar_t *DistributionConfigurationDateCreated = jResp.stringOf(L"image.distributionConfiguration.dateCreated");
    const wchar_t *DateUpdated = jResp.stringOf(L"image.distributionConfiguration.dateUpdated");
    const wchar_t *DistributionConfigurationDescription = jResp.stringOf(L"image.distributionConfiguration.description");
    const wchar_t *DistributionConfigurationName = jResp.stringOf(L"image.distributionConfiguration.name");
    const wchar_t *TagsString = jResp.stringOf(L"image.distributionConfiguration.tags.string");
    int TimeoutMinutes = jResp.IntOf(L"image.distributionConfiguration.timeoutMinutes");
    int EnhancedImageMetadataEnabled = jResp.IntOf(L"image.enhancedImageMetadataEnabled");
    int UninstallAfterBuild = jResp.IntOf(L"image.imageRecipe.additionalInstanceConfiguration.systemsManagerAgent.uninstallAfterBuild");
    const wchar_t *UserDataOverride = jResp.stringOf(L"image.imageRecipe.additionalInstanceConfiguration.userDataOverride");
    const wchar_t *ImageRecipeArn = jResp.stringOf(L"image.imageRecipe.arn");
    const wchar_t *ImageRecipeDateCreated = jResp.stringOf(L"image.imageRecipe.dateCreated");
    const wchar_t *ImageRecipeDescription = jResp.stringOf(L"image.imageRecipe.description");
    const wchar_t *ImageRecipeName = jResp.stringOf(L"image.imageRecipe.name");
    const wchar_t *ImageRecipeOwner = jResp.stringOf(L"image.imageRecipe.owner");
    const wchar_t *ImageRecipeParentImage = jResp.stringOf(L"image.imageRecipe.parentImage");
    const wchar_t *ImageRecipePlatform = jResp.stringOf(L"image.imageRecipe.platform");
    TagsString = jResp.stringOf(L"image.imageRecipe.tags.string");
    const wchar_t *v_Type = jResp.stringOf(L"image.imageRecipe.type");
    const wchar_t *ImageRecipeVersion = jResp.stringOf(L"image.imageRecipe.version");
    const wchar_t *ImageRecipeWorkingDirectory = jResp.stringOf(L"image.imageRecipe.workingDirectory");
    int ImageTestsEnabled = jResp.IntOf(L"image.imageTestsConfiguration.imageTestsEnabled");
    int ImageTestsConfigurationTimeoutMinutes = jResp.IntOf(L"image.imageTestsConfiguration.timeoutMinutes");
    const wchar_t *InfrastructureConfigurationArn = jResp.stringOf(L"image.infrastructureConfiguration.arn");
    const wchar_t *InfrastructureConfigurationDateCreated = jResp.stringOf(L"image.infrastructureConfiguration.dateCreated");
    const wchar_t *InfrastructureConfigurationDateUpdated = jResp.stringOf(L"image.infrastructureConfiguration.dateUpdated");
    const wchar_t *InfrastructureConfigurationDescription = jResp.stringOf(L"image.infrastructureConfiguration.description");
    int HttpPutResponseHopLimit = jResp.IntOf(L"image.infrastructureConfiguration.instanceMetadataOptions.httpPutResponseHopLimit");
    const wchar_t *HttpTokens = jResp.stringOf(L"image.infrastructureConfiguration.instanceMetadataOptions.httpTokens");
    const wchar_t *InstanceProfileName = jResp.stringOf(L"image.infrastructureConfiguration.instanceProfileName");
    const wchar_t *KeyPair = jResp.stringOf(L"image.infrastructureConfiguration.keyPair");
    const wchar_t *S3BucketName = jResp.stringOf(L"image.infrastructureConfiguration.logging.s3Logs.s3BucketName");
    const wchar_t *S3KeyPrefix = jResp.stringOf(L"image.infrastructureConfiguration.logging.s3Logs.s3KeyPrefix");
    const wchar_t *InfrastructureConfigurationName = jResp.stringOf(L"image.infrastructureConfiguration.name");
    const wchar_t *ResourceTagsString = jResp.stringOf(L"image.infrastructureConfiguration.resourceTags.string");
    const wchar_t *SnsTopicArn = jResp.stringOf(L"image.infrastructureConfiguration.snsTopicArn");
    const wchar_t *SubnetId = jResp.stringOf(L"image.infrastructureConfiguration.subnetId");
    TagsString = jResp.stringOf(L"image.infrastructureConfiguration.tags.string");
    int TerminateInstanceOnFailure = jResp.IntOf(L"image.infrastructureConfiguration.terminateInstanceOnFailure");
    const wchar_t *imageName = jResp.stringOf(L"image.name");
    const wchar_t *OsVersion = jResp.stringOf(L"image.osVersion");
    const wchar_t *imagePlatform = jResp.stringOf(L"image.platform");
    const wchar_t *SourcePipelineArn = jResp.stringOf(L"image.sourcePipelineArn");
    const wchar_t *SourcePipelineName = jResp.stringOf(L"image.sourcePipelineName");
    const wchar_t *Reason = jResp.stringOf(L"image.state.reason");
    const wchar_t *Status = jResp.stringOf(L"image.state.status");
    TagsString = jResp.stringOf(L"image.tags.string");
    const wchar_t *imageType = jResp.stringOf(L"image.type");
    const wchar_t *imageVersion = jResp.stringOf(L"image.version");
    const wchar_t *requestId = jResp.stringOf(L"requestId");
    int i = 0;
    int count_i = jResp.SizeOfArray(L"image.containerRecipe.components");
    while (i < count_i) {
        jResp.put_I(i);
        componentArn = jResp.stringOf(L"image.containerRecipe.components[i].componentArn");
        j = 0;
        count_j = jResp.SizeOfArray(L"image.containerRecipe.components[i].parameters");
        while (j < count_j) {
            jResp.put_J(j);
            name = jResp.stringOf(L"image.containerRecipe.components[i].parameters[j].name");
            k = 0;
            count_k = jResp.SizeOfArray(L"image.containerRecipe.components[i].parameters[j].value");
            while (k < count_k) {
                jResp.put_K(k);
                strVal = jResp.stringOf(L"image.containerRecipe.components[i].parameters[j].value[k]");
                k = k + 1;
            }

            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"image.containerRecipe.instanceConfiguration.blockDeviceMappings");
    while (i < count_i) {
        jResp.put_I(i);
        deviceName = jResp.stringOf(L"image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].deviceName");
        DeleteOnTermination = jResp.IntOf(L"image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.deleteOnTermination");
        ebsEncrypted = jResp.IntOf(L"image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.encrypted");
        Iops = jResp.IntOf(L"image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.iops");
        ebsKmsKeyId = jResp.stringOf(L"image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.kmsKeyId");
        SnapshotId = jResp.stringOf(L"image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.snapshotId");
        Throughput = jResp.IntOf(L"image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.throughput");
        VolumeSize = jResp.IntOf(L"image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.volumeSize");
        VolumeType = jResp.stringOf(L"image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.volumeType");
        noDevice = jResp.stringOf(L"image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].noDevice");
        virtualName = jResp.stringOf(L"image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].virtualName");
        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"image.distributionConfiguration.distributions");
    while (i < count_i) {
        jResp.put_I(i);
        AmiTagsString = jResp.stringOf(L"image.distributionConfiguration.distributions[i].amiDistributionConfiguration.amiTags.string");
        amiDistributionConfigurationDescription = jResp.stringOf(L"image.distributionConfiguration.distributions[i].amiDistributionConfiguration.description");
        amiDistributionConfigurationKmsKeyId = jResp.stringOf(L"image.distributionConfiguration.distributions[i].amiDistributionConfiguration.kmsKeyId");
        amiDistributionConfigurationName = jResp.stringOf(L"image.distributionConfiguration.distributions[i].amiDistributionConfiguration.name");
        containerDistributionConfigurationDescription = jResp.stringOf(L"image.distributionConfiguration.distributions[i].containerDistributionConfiguration.description");
        TargetRepositoryRepositoryName = jResp.stringOf(L"image.distributionConfiguration.distributions[i].containerDistributionConfiguration.targetRepository.repositoryName");
        TargetRepositoryService = jResp.stringOf(L"image.distributionConfiguration.distributions[i].containerDistributionConfiguration.targetRepository.service");
        region = jResp.stringOf(L"image.distributionConfiguration.distributions[i].region");
        DiskImageFormat = jResp.stringOf(L"image.distributionConfiguration.distributions[i].s3ExportConfiguration.diskImageFormat");
        RoleName = jResp.stringOf(L"image.distributionConfiguration.distributions[i].s3ExportConfiguration.roleName");
        S3Bucket = jResp.stringOf(L"image.distributionConfiguration.distributions[i].s3ExportConfiguration.s3Bucket");
        S3Prefix = jResp.stringOf(L"image.distributionConfiguration.distributions[i].s3ExportConfiguration.s3Prefix");
        j = 0;
        count_j = jResp.SizeOfArray(L"image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationalUnitArns");
        while (j < count_j) {
            jResp.put_J(j);
            strVal = jResp.stringOf(L"image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationalUnitArns[j]");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationArns");
        while (j < count_j) {
            jResp.put_J(j);
            strVal = jResp.stringOf(L"image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationArns[j]");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userGroups");
        while (j < count_j) {
            jResp.put_J(j);
            strVal = jResp.stringOf(L"image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userGroups[j]");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userIds");
        while (j < count_j) {
            jResp.put_J(j);
            strVal = jResp.stringOf(L"image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userIds[j]");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"image.distributionConfiguration.distributions[i].amiDistributionConfiguration.targetAccountIds");
        while (j < count_j) {
            jResp.put_J(j);
            strVal = jResp.stringOf(L"image.distributionConfiguration.distributions[i].amiDistributionConfiguration.targetAccountIds[j]");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"image.distributionConfiguration.distributions[i].containerDistributionConfiguration.containerTags");
        while (j < count_j) {
            jResp.put_J(j);
            strVal = jResp.stringOf(L"image.distributionConfiguration.distributions[i].containerDistributionConfiguration.containerTags[j]");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"image.distributionConfiguration.distributions[i].fastLaunchConfigurations");
        while (j < count_j) {
            jResp.put_J(j);
            accountId = jResp.stringOf(L"image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].accountId");
            enabled = jResp.IntOf(L"image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].enabled");
            LaunchTemplateId = jResp.stringOf(L"image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].launchTemplate.launchTemplateId");
            LaunchTemplateName = jResp.stringOf(L"image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].launchTemplate.launchTemplateName");
            LaunchTemplateVersion = jResp.stringOf(L"image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].launchTemplate.launchTemplateVersion");
            maxParallelLaunches = jResp.IntOf(L"image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].maxParallelLaunches");
            TargetResourceCount = jResp.IntOf(L"image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].snapshotConfiguration.targetResourceCount");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"image.distributionConfiguration.distributions[i].launchTemplateConfigurations");
        while (j < count_j) {
            jResp.put_J(j);
            accountId = jResp.stringOf(L"image.distributionConfiguration.distributions[i].launchTemplateConfigurations[j].accountId");
            launchTemplateId = jResp.stringOf(L"image.distributionConfiguration.distributions[i].launchTemplateConfigurations[j].launchTemplateId");
            setDefaultVersion = jResp.IntOf(L"image.distributionConfiguration.distributions[i].launchTemplateConfigurations[j].setDefaultVersion");
            j = j + 1;
        }

        j = 0;
        count_j = jResp.SizeOfArray(L"image.distributionConfiguration.distributions[i].licenseConfigurationArns");
        while (j < count_j) {
            jResp.put_J(j);
            strVal = jResp.stringOf(L"image.distributionConfiguration.distributions[i].licenseConfigurationArns[j]");
            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"image.imageRecipe.blockDeviceMappings");
    while (i < count_i) {
        jResp.put_I(i);
        deviceName = jResp.stringOf(L"image.imageRecipe.blockDeviceMappings[i].deviceName");
        ebsDeleteOnTermination = jResp.IntOf(L"image.imageRecipe.blockDeviceMappings[i].ebs.deleteOnTermination");
        ebsEncrypted = jResp.IntOf(L"image.imageRecipe.blockDeviceMappings[i].ebs.encrypted");
        ebsIops = jResp.IntOf(L"image.imageRecipe.blockDeviceMappings[i].ebs.iops");
        ebsKmsKeyId = jResp.stringOf(L"image.imageRecipe.blockDeviceMappings[i].ebs.kmsKeyId");
        ebsSnapshotId = jResp.stringOf(L"image.imageRecipe.blockDeviceMappings[i].ebs.snapshotId");
        ebsThroughput = jResp.IntOf(L"image.imageRecipe.blockDeviceMappings[i].ebs.throughput");
        ebsVolumeSize = jResp.IntOf(L"image.imageRecipe.blockDeviceMappings[i].ebs.volumeSize");
        ebsVolumeType = jResp.stringOf(L"image.imageRecipe.blockDeviceMappings[i].ebs.volumeType");
        noDevice = jResp.stringOf(L"image.imageRecipe.blockDeviceMappings[i].noDevice");
        virtualName = jResp.stringOf(L"image.imageRecipe.blockDeviceMappings[i].virtualName");
        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"image.imageRecipe.components");
    while (i < count_i) {
        jResp.put_I(i);
        componentArn = jResp.stringOf(L"image.imageRecipe.components[i].componentArn");
        j = 0;
        count_j = jResp.SizeOfArray(L"image.imageRecipe.components[i].parameters");
        while (j < count_j) {
            jResp.put_J(j);
            name = jResp.stringOf(L"image.imageRecipe.components[i].parameters[j].name");
            k = 0;
            count_k = jResp.SizeOfArray(L"image.imageRecipe.components[i].parameters[j].value");
            while (k < count_k) {
                jResp.put_K(k);
                strVal = jResp.stringOf(L"image.imageRecipe.components[i].parameters[j].value[k]");
                k = k + 1;
            }

            j = j + 1;
        }

        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"image.infrastructureConfiguration.instanceTypes");
    while (i < count_i) {
        jResp.put_I(i);
        strVal = jResp.stringOf(L"image.infrastructureConfiguration.instanceTypes[i]");
        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"image.infrastructureConfiguration.securityGroupIds");
    while (i < count_i) {
        jResp.put_I(i);
        strVal = jResp.stringOf(L"image.infrastructureConfiguration.securityGroupIds[i]");
        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"image.outputResources.amis");
    while (i < count_i) {
        jResp.put_I(i);
        accountId = jResp.stringOf(L"image.outputResources.amis[i].accountId");
        description = jResp.stringOf(L"image.outputResources.amis[i].description");
        image = jResp.stringOf(L"image.outputResources.amis[i].image");
        name = jResp.stringOf(L"image.outputResources.amis[i].name");
        region = jResp.stringOf(L"image.outputResources.amis[i].region");
        stateReason = jResp.stringOf(L"image.outputResources.amis[i].state.reason");
        stateStatus = jResp.stringOf(L"image.outputResources.amis[i].state.status");
        i = i + 1;
    }

    i = 0;
    count_i = jResp.SizeOfArray(L"image.outputResources.containers");
    while (i < count_i) {
        jResp.put_I(i);
        region = jResp.stringOf(L"image.outputResources.containers[i].region");
        j = 0;
        count_j = jResp.SizeOfArray(L"image.outputResources.containers[i].imageUris");
        while (j < count_j) {
            jResp.put_J(j);
            strVal = jResp.stringOf(L"image.outputResources.containers[i].imageUris[j]");
            j = j + 1;
        }

        i = 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"
    // }
    }