Chilkat Online Tools

GetImage VB6 Example

EC2 Image Builder

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

Dim rest As New ChilkatRest
Dim success As Long

Dim authAws As New ChilkatAuthAws
authAws.AccessKey = "AWS_ACCESS_KEY"
authAws.SecretKey = "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.Region = "us-west-2"
authAws.ServiceName = "imagebuilder"
' SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
success = 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,1,1)
If (success <> 1) Then
    Debug.Print "ConnectFailReason: " & rest.ConnectFailReason
    Debug.Print rest.LastErrorText
    Exit Sub
End If

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

Dim sbResponseBody As New ChilkatStringBuilder
success = rest.FullRequestNoBodySb("GET","/GetImage",sbResponseBody)
If (success <> 1) Then
    Debug.Print rest.LastErrorText
    Exit Sub
End If

Dim respStatusCode As Long
respStatusCode = rest.ResponseStatusCode
Debug.Print "response status code = " & respStatusCode
If (respStatusCode <> 200) Then
    Debug.Print "Response Header:"
    Debug.Print rest.ResponseHeader
    Debug.Print "Response Body:"
    Debug.Print sbResponseBody.GetAsString()
    Exit Sub
End If

Dim jResp As New ChilkatJsonObject
success = 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

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

Dim Arn As String
Arn = jResp.StringOf("image.arn")
Dim BuildType As String
BuildType = jResp.StringOf("image.buildType")
Dim ContainerRecipeArn As String
ContainerRecipeArn = jResp.StringOf("image.containerRecipe.arn")
Dim ContainerType As String
ContainerType = jResp.StringOf("image.containerRecipe.containerType")
Dim DateCreated As String
DateCreated = jResp.StringOf("image.containerRecipe.dateCreated")
Dim Description As String
Description = jResp.StringOf("image.containerRecipe.description")
Dim DockerfileTemplateData As String
DockerfileTemplateData = jResp.StringOf("image.containerRecipe.dockerfileTemplateData")
Dim Encrypted As Long
Encrypted = jResp.IntOf("image.containerRecipe.encrypted")
Dim Image As String
Image = jResp.StringOf("image.containerRecipe.instanceConfiguration.image")
Dim KmsKeyId As String
KmsKeyId = jResp.StringOf("image.containerRecipe.kmsKeyId")
Dim Name As String
Name = jResp.StringOf("image.containerRecipe.name")
Dim Owner As String
Owner = jResp.StringOf("image.containerRecipe.owner")
Dim ParentImage As String
ParentImage = jResp.StringOf("image.containerRecipe.parentImage")
Dim Platform As String
Platform = jResp.StringOf("image.containerRecipe.platform")
Dim v_String As String
v_String = jResp.StringOf("image.containerRecipe.tags.string")
Dim RepositoryName As String
RepositoryName = jResp.StringOf("image.containerRecipe.targetRepository.repositoryName")
Dim Service As String
Service = jResp.StringOf("image.containerRecipe.targetRepository.service")
Dim Version As String
Version = jResp.StringOf("image.containerRecipe.version")
Dim WorkingDirectory As String
WorkingDirectory = jResp.StringOf("image.containerRecipe.workingDirectory")
Dim imageDateCreated As String
imageDateCreated = jResp.StringOf("image.dateCreated")
Dim DistributionConfigurationArn As String
DistributionConfigurationArn = jResp.StringOf("image.distributionConfiguration.arn")
Dim DistributionConfigurationDateCreated As String
DistributionConfigurationDateCreated = jResp.StringOf("image.distributionConfiguration.dateCreated")
Dim DateUpdated As String
DateUpdated = jResp.StringOf("image.distributionConfiguration.dateUpdated")
Dim DistributionConfigurationDescription As String
DistributionConfigurationDescription = jResp.StringOf("image.distributionConfiguration.description")
Dim DistributionConfigurationName As String
DistributionConfigurationName = jResp.StringOf("image.distributionConfiguration.name")
Dim TagsString As String
TagsString = jResp.StringOf("image.distributionConfiguration.tags.string")
Dim TimeoutMinutes As Long
TimeoutMinutes = jResp.IntOf("image.distributionConfiguration.timeoutMinutes")
Dim EnhancedImageMetadataEnabled As Long
EnhancedImageMetadataEnabled = jResp.IntOf("image.enhancedImageMetadataEnabled")
Dim UninstallAfterBuild As Long
UninstallAfterBuild = jResp.IntOf("image.imageRecipe.additionalInstanceConfiguration.systemsManagerAgent.uninstallAfterBuild")
Dim UserDataOverride As String
UserDataOverride = jResp.StringOf("image.imageRecipe.additionalInstanceConfiguration.userDataOverride")
Dim ImageRecipeArn As String
ImageRecipeArn = jResp.StringOf("image.imageRecipe.arn")
Dim ImageRecipeDateCreated As String
ImageRecipeDateCreated = jResp.StringOf("image.imageRecipe.dateCreated")
Dim ImageRecipeDescription As String
ImageRecipeDescription = jResp.StringOf("image.imageRecipe.description")
Dim ImageRecipeName As String
ImageRecipeName = jResp.StringOf("image.imageRecipe.name")
Dim ImageRecipeOwner As String
ImageRecipeOwner = jResp.StringOf("image.imageRecipe.owner")
Dim ImageRecipeParentImage As String
ImageRecipeParentImage = jResp.StringOf("image.imageRecipe.parentImage")
Dim ImageRecipePlatform As String
ImageRecipePlatform = jResp.StringOf("image.imageRecipe.platform")
TagsString = jResp.StringOf("image.imageRecipe.tags.string")
Dim v_Type As String
v_Type = jResp.StringOf("image.imageRecipe.type")
Dim ImageRecipeVersion As String
ImageRecipeVersion = jResp.StringOf("image.imageRecipe.version")
Dim ImageRecipeWorkingDirectory As String
ImageRecipeWorkingDirectory = jResp.StringOf("image.imageRecipe.workingDirectory")
Dim ImageTestsEnabled As Long
ImageTestsEnabled = jResp.IntOf("image.imageTestsConfiguration.imageTestsEnabled")
Dim ImageTestsConfigurationTimeoutMinutes As Long
ImageTestsConfigurationTimeoutMinutes = jResp.IntOf("image.imageTestsConfiguration.timeoutMinutes")
Dim InfrastructureConfigurationArn As String
InfrastructureConfigurationArn = jResp.StringOf("image.infrastructureConfiguration.arn")
Dim InfrastructureConfigurationDateCreated As String
InfrastructureConfigurationDateCreated = jResp.StringOf("image.infrastructureConfiguration.dateCreated")
Dim InfrastructureConfigurationDateUpdated As String
InfrastructureConfigurationDateUpdated = jResp.StringOf("image.infrastructureConfiguration.dateUpdated")
Dim InfrastructureConfigurationDescription As String
InfrastructureConfigurationDescription = jResp.StringOf("image.infrastructureConfiguration.description")
Dim HttpPutResponseHopLimit As Long
HttpPutResponseHopLimit = jResp.IntOf("image.infrastructureConfiguration.instanceMetadataOptions.httpPutResponseHopLimit")
Dim HttpTokens As String
HttpTokens = jResp.StringOf("image.infrastructureConfiguration.instanceMetadataOptions.httpTokens")
Dim InstanceProfileName As String
InstanceProfileName = jResp.StringOf("image.infrastructureConfiguration.instanceProfileName")
Dim KeyPair As String
KeyPair = jResp.StringOf("image.infrastructureConfiguration.keyPair")
Dim S3BucketName As String
S3BucketName = jResp.StringOf("image.infrastructureConfiguration.logging.s3Logs.s3BucketName")
Dim S3KeyPrefix As String
S3KeyPrefix = jResp.StringOf("image.infrastructureConfiguration.logging.s3Logs.s3KeyPrefix")
Dim InfrastructureConfigurationName As String
InfrastructureConfigurationName = jResp.StringOf("image.infrastructureConfiguration.name")
Dim ResourceTagsString As String
ResourceTagsString = jResp.StringOf("image.infrastructureConfiguration.resourceTags.string")
Dim SnsTopicArn As String
SnsTopicArn = jResp.StringOf("image.infrastructureConfiguration.snsTopicArn")
Dim SubnetId As String
SubnetId = jResp.StringOf("image.infrastructureConfiguration.subnetId")
TagsString = jResp.StringOf("image.infrastructureConfiguration.tags.string")
Dim TerminateInstanceOnFailure As Long
TerminateInstanceOnFailure = jResp.IntOf("image.infrastructureConfiguration.terminateInstanceOnFailure")
Dim imageName As String
imageName = jResp.StringOf("image.name")
Dim OsVersion As String
OsVersion = jResp.StringOf("image.osVersion")
Dim imagePlatform As String
imagePlatform = jResp.StringOf("image.platform")
Dim SourcePipelineArn As String
SourcePipelineArn = jResp.StringOf("image.sourcePipelineArn")
Dim SourcePipelineName As String
SourcePipelineName = jResp.StringOf("image.sourcePipelineName")
Dim Reason As String
Reason = jResp.StringOf("image.state.reason")
Dim Status As String
Status = jResp.StringOf("image.state.status")
TagsString = jResp.StringOf("image.tags.string")
Dim imageType As String
imageType = jResp.StringOf("image.type")
Dim imageVersion As String
imageVersion = jResp.StringOf("image.version")
Dim requestId As String
requestId = jResp.StringOf("requestId")
Dim i As Long
i = 0
Dim count_i As Long
count_i = jResp.SizeOfArray("image.containerRecipe.components")
Do While i < count_i
    jResp.I = i
    componentArn = jResp.StringOf("image.containerRecipe.components[i].componentArn")
    j = 0
    count_j = jResp.SizeOfArray("image.containerRecipe.components[i].parameters")
    Do While j < count_j
        jResp.J = j
        name = jResp.StringOf("image.containerRecipe.components[i].parameters[j].name")
        k = 0
        count_k = jResp.SizeOfArray("image.containerRecipe.components[i].parameters[j].value")
        Do While k < count_k
            jResp.K = k
            strVal = jResp.StringOf("image.containerRecipe.components[i].parameters[j].value[k]")
            k = k + 1
        Loop
        j = j + 1
    Loop
    i = i + 1
Loop
i = 0
count_i = jResp.SizeOfArray("image.containerRecipe.instanceConfiguration.blockDeviceMappings")
Do While i < count_i
    jResp.I = 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
Loop
i = 0
count_i = jResp.SizeOfArray("image.distributionConfiguration.distributions")
Do While i < count_i
    jResp.I = 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")
    Do While j < count_j
        jResp.J = j
        strVal = jResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationalUnitArns[j]")
        j = j + 1
    Loop
    j = 0
    count_j = jResp.SizeOfArray("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationArns")
    Do While j < count_j
        jResp.J = j
        strVal = jResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationArns[j]")
        j = j + 1
    Loop
    j = 0
    count_j = jResp.SizeOfArray("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userGroups")
    Do While j < count_j
        jResp.J = j
        strVal = jResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userGroups[j]")
        j = j + 1
    Loop
    j = 0
    count_j = jResp.SizeOfArray("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userIds")
    Do While j < count_j
        jResp.J = j
        strVal = jResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userIds[j]")
        j = j + 1
    Loop
    j = 0
    count_j = jResp.SizeOfArray("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.targetAccountIds")
    Do While j < count_j
        jResp.J = j
        strVal = jResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.targetAccountIds[j]")
        j = j + 1
    Loop
    j = 0
    count_j = jResp.SizeOfArray("image.distributionConfiguration.distributions[i].containerDistributionConfiguration.containerTags")
    Do While j < count_j
        jResp.J = j
        strVal = jResp.StringOf("image.distributionConfiguration.distributions[i].containerDistributionConfiguration.containerTags[j]")
        j = j + 1
    Loop
    j = 0
    count_j = jResp.SizeOfArray("image.distributionConfiguration.distributions[i].fastLaunchConfigurations")
    Do While j < count_j
        jResp.J = 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
    Loop
    j = 0
    count_j = jResp.SizeOfArray("image.distributionConfiguration.distributions[i].launchTemplateConfigurations")
    Do While j < count_j
        jResp.J = 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
    Loop
    j = 0
    count_j = jResp.SizeOfArray("image.distributionConfiguration.distributions[i].licenseConfigurationArns")
    Do While j < count_j
        jResp.J = j
        strVal = jResp.StringOf("image.distributionConfiguration.distributions[i].licenseConfigurationArns[j]")
        j = j + 1
    Loop
    i = i + 1
Loop
i = 0
count_i = jResp.SizeOfArray("image.imageRecipe.blockDeviceMappings")
Do While i < count_i
    jResp.I = 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
Loop
i = 0
count_i = jResp.SizeOfArray("image.imageRecipe.components")
Do While i < count_i
    jResp.I = i
    componentArn = jResp.StringOf("image.imageRecipe.components[i].componentArn")
    j = 0
    count_j = jResp.SizeOfArray("image.imageRecipe.components[i].parameters")
    Do While j < count_j
        jResp.J = j
        name = jResp.StringOf("image.imageRecipe.components[i].parameters[j].name")
        k = 0
        count_k = jResp.SizeOfArray("image.imageRecipe.components[i].parameters[j].value")
        Do While k < count_k
            jResp.K = k
            strVal = jResp.StringOf("image.imageRecipe.components[i].parameters[j].value[k]")
            k = k + 1
        Loop
        j = j + 1
    Loop
    i = i + 1
Loop
i = 0
count_i = jResp.SizeOfArray("image.infrastructureConfiguration.instanceTypes")
Do While i < count_i
    jResp.I = i
    strVal = jResp.StringOf("image.infrastructureConfiguration.instanceTypes[i]")
    i = i + 1
Loop
i = 0
count_i = jResp.SizeOfArray("image.infrastructureConfiguration.securityGroupIds")
Do While i < count_i
    jResp.I = i
    strVal = jResp.StringOf("image.infrastructureConfiguration.securityGroupIds[i]")
    i = i + 1
Loop
i = 0
count_i = jResp.SizeOfArray("image.outputResources.amis")
Do While i < count_i
    jResp.I = 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
Loop
i = 0
count_i = jResp.SizeOfArray("image.outputResources.containers")
Do While i < count_i
    jResp.I = i
    region = jResp.StringOf("image.outputResources.containers[i].region")
    j = 0
    count_j = jResp.SizeOfArray("image.outputResources.containers[i].imageUris")
    Do While j < count_j
        jResp.J = j
        strVal = jResp.StringOf("image.outputResources.containers[i].imageUris[j]")
        j = j + 1
    Loop
    i = i + 1
Loop

' 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"
' }