Chilkat Online Tools

GetImage Go Example

EC2 Image Builder

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

    rest := chilkat.NewRest()
    var success bool

    authAws := chilkat.NewAuthAws()
    authAws.SetAccessKey("AWS_ACCESS_KEY")
    authAws.SetSecretKey("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.SetRegion("us-west-2")
    authAws.SetServiceName("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("imagebuilder.us-west-2.amazonaws.com",443,true,true)
    if success != true {
        fmt.Println("ConnectFailReason: ", rest.ConnectFailReason())
        fmt.Println(rest.LastErrorText())
        rest.DisposeRest()
        authAws.DisposeAuthAws()
        return
    }

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

    sbResponseBody := chilkat.NewStringBuilder()
    success = rest.FullRequestNoBodySb("GET","/GetImage",sbResponseBody)
    if success != true {
        fmt.Println(rest.LastErrorText())
        rest.DisposeRest()
        authAws.DisposeAuthAws()
        sbResponseBody.DisposeStringBuilder()
        return
    }

    respStatusCode := rest.ResponseStatusCode()
    fmt.Println("response status code = ", respStatusCode)
    if respStatusCode != 200 {
        fmt.Println("Response Header:")
        fmt.Println(rest.ResponseHeader())
        fmt.Println("Response Body:")
        fmt.Println(*sbResponseBody.GetAsString())
        rest.DisposeRest()
        authAws.DisposeAuthAws()
        sbResponseBody.DisposeStringBuilder()
        return
    }

    jResp := chilkat.NewJsonObject()
    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

componentArn_DECLARATION
    var j int
    var count_j int
name_DECLARATION
    var k int
    var count_k int
strVal_DECLARATION
deviceName_DECLARATION
    var DeleteOnTermination int
    var ebsEncrypted int
    var Iops int
ebsKmsKeyId_DECLARATION
SnapshotId_DECLARATION
    var Throughput int
    var VolumeSize int
VolumeType_DECLARATION
noDevice_DECLARATION
virtualName_DECLARATION
AmiTagsString_DECLARATION
amiDistributionConfigurationDescription_DECLARATION
amiDistributionConfigurationKmsKeyId_DECLARATION
amiDistributionConfigurationName_DECLARATION
containerDistributionConfigurationDescription_DECLARATION
TargetRepositoryRepositoryName_DECLARATION
TargetRepositoryService_DECLARATION
region_DECLARATION
DiskImageFormat_DECLARATION
RoleName_DECLARATION
S3Bucket_DECLARATION
S3Prefix_DECLARATION
accountId_DECLARATION
    var enabled int
LaunchTemplateId_DECLARATION
LaunchTemplateName_DECLARATION
LaunchTemplateVersion_DECLARATION
    var maxParallelLaunches int
    var TargetResourceCount int
launchTemplateId_DECLARATION
    var setDefaultVersion int
    var ebsDeleteOnTermination int
    var ebsIops int
ebsSnapshotId_DECLARATION
    var ebsThroughput int
    var ebsVolumeSize int
ebsVolumeType_DECLARATION
description_DECLARATION
image_DECLARATION
stateReason_DECLARATION
stateStatus_DECLARATION

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

            j = j + 1
        }

        i = i + 1
    }

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

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

        j = 0
        count_j = jResp.SizeOfArray("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationArns")
        for j < count_j {
            jResp.SetJ(j)
            strVal = *jResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationArns[j]")
            j = j + 1
        }

        j = 0
        count_j = jResp.SizeOfArray("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userGroups")
        for j < count_j {
            jResp.SetJ(j)
            strVal = *jResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userGroups[j]")
            j = j + 1
        }

        j = 0
        count_j = jResp.SizeOfArray("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userIds")
        for j < count_j {
            jResp.SetJ(j)
            strVal = *jResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userIds[j]")
            j = j + 1
        }

        j = 0
        count_j = jResp.SizeOfArray("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.targetAccountIds")
        for j < count_j {
            jResp.SetJ(j)
            strVal = *jResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.targetAccountIds[j]")
            j = j + 1
        }

        j = 0
        count_j = jResp.SizeOfArray("image.distributionConfiguration.distributions[i].containerDistributionConfiguration.containerTags")
        for j < count_j {
            jResp.SetJ(j)
            strVal = *jResp.StringOf("image.distributionConfiguration.distributions[i].containerDistributionConfiguration.containerTags[j]")
            j = j + 1
        }

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

        j = 0
        count_j = jResp.SizeOfArray("image.distributionConfiguration.distributions[i].launchTemplateConfigurations")
        for j < count_j {
            jResp.SetJ(j)
            accountId = *jResp.StringOf("image.distributionConfiguration.distributions[i].launchTemplateConfigurations[j].accountId")
            launchTemplateId = *jResp.StringOf("image.distributionConfiguration.distributions[i].launchTemplateConfigurations[j].launchTemplateId")
            setDefaultVersion = jResp.IntOf("image.distributionConfiguration.distributions[i].launchTemplateConfigurations[j].setDefaultVersion")
            j = j + 1
        }

        j = 0
        count_j = jResp.SizeOfArray("image.distributionConfiguration.distributions[i].licenseConfigurationArns")
        for j < count_j {
            jResp.SetJ(j)
            strVal = *jResp.StringOf("image.distributionConfiguration.distributions[i].licenseConfigurationArns[j]")
            j = j + 1
        }

        i = i + 1
    }

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

    i = 0
    count_i = jResp.SizeOfArray("image.imageRecipe.components")
    for i < count_i {
        jResp.SetI(i)
        componentArn = *jResp.StringOf("image.imageRecipe.components[i].componentArn")
        j = 0
        count_j = jResp.SizeOfArray("image.imageRecipe.components[i].parameters")
        for j < count_j {
            jResp.SetJ(j)
            name = *jResp.StringOf("image.imageRecipe.components[i].parameters[j].name")
            k = 0
            count_k = jResp.SizeOfArray("image.imageRecipe.components[i].parameters[j].value")
            for k < count_k {
                jResp.SetK(k)
                strVal = *jResp.StringOf("image.imageRecipe.components[i].parameters[j].value[k]")
                k = k + 1
            }

            j = j + 1
        }

        i = i + 1
    }

    i = 0
    count_i = jResp.SizeOfArray("image.infrastructureConfiguration.instanceTypes")
    for i < count_i {
        jResp.SetI(i)
        strVal = *jResp.StringOf("image.infrastructureConfiguration.instanceTypes[i]")
        i = i + 1
    }

    i = 0
    count_i = jResp.SizeOfArray("image.infrastructureConfiguration.securityGroupIds")
    for i < count_i {
        jResp.SetI(i)
        strVal = *jResp.StringOf("image.infrastructureConfiguration.securityGroupIds[i]")
        i = i + 1
    }

    i = 0
    count_i = jResp.SizeOfArray("image.outputResources.amis")
    for i < count_i {
        jResp.SetI(i)
        accountId = *jResp.StringOf("image.outputResources.amis[i].accountId")
        description = *jResp.StringOf("image.outputResources.amis[i].description")
        image = *jResp.StringOf("image.outputResources.amis[i].image")
        name = *jResp.StringOf("image.outputResources.amis[i].name")
        region = *jResp.StringOf("image.outputResources.amis[i].region")
        stateReason = *jResp.StringOf("image.outputResources.amis[i].state.reason")
        stateStatus = *jResp.StringOf("image.outputResources.amis[i].state.status")
        i = i + 1
    }

    i = 0
    count_i = jResp.SizeOfArray("image.outputResources.containers")
    for i < count_i {
        jResp.SetI(i)
        region = *jResp.StringOf("image.outputResources.containers[i].region")
        j = 0
        count_j = jResp.SizeOfArray("image.outputResources.containers[i].imageUris")
        for j < count_j {
            jResp.SetJ(j)
            strVal = *jResp.StringOf("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"
    // }

    rest.DisposeRest()
    authAws.DisposeAuthAws()
    sbResponseBody.DisposeStringBuilder()
    jResp.DisposeJsonObject()