GetImage DataFlex Example
Use ChilkatAx-9.5.0-win32.pkg
Procedure Test
Handle hoRest
Boolean iSuccess
Variant vAuthAws
Handle hoAuthAws
Variant vSbResponseBody
Handle hoSbResponseBody
Integer iRespStatusCode
Handle hoJResp
String sComponentArn
Integer j
Integer iCount_j
String sName
Integer k
Integer iCount_k
String sStrVal
String sDeviceName
Integer iDeleteOnTermination
Integer iEbsEncrypted
Integer iIops
String sEbsKmsKeyId
String sSnapshotId
Integer iThroughput
Integer iVolumeSize
String sVolumeType
String sNoDevice
String sVirtualName
String sAmiTagsString
String sAmiDistributionConfigurationDescription
String sAmiDistributionConfigurationKmsKeyId
String sAmiDistributionConfigurationName
String sContainerDistributionConfigurationDescription
String sTargetRepositoryRepositoryName
String sTargetRepositoryService
String sRegion
String sDiskImageFormat
String sRoleName
String sS3Bucket
String sS3Prefix
String sAccountId
Integer iEnabled
String sLaunchTemplateId
String sLaunchTemplateName
String sLaunchTemplateVersion
Integer iMaxParallelLaunches
Integer iTargetResourceCount
String sLaunchTemplateId
Integer iSetDefaultVersion
Integer iEbsDeleteOnTermination
Integer iEbsIops
String sEbsSnapshotId
Integer iEbsThroughput
Integer iEbsVolumeSize
String sEbsVolumeType
String sDescription
String sImage
String sStateReason
String sStateStatus
String sArn
String sBuildType
String sContainerRecipeArn
String sContainerType
String sDateCreated
String sDescription
String sDockerfileTemplateData
Integer iEncrypted
String sImage
String sKmsKeyId
String sName
String sOwner
String sParentImage
String sPlatform
String sV_String
String sRepositoryName
String sService
String sVersion
String sWorkingDirectory
String sImageDateCreated
String sDistributionConfigurationArn
String sDistributionConfigurationDateCreated
String sDateUpdated
String sDistributionConfigurationDescription
String sDistributionConfigurationName
String sTagsString
Integer iTimeoutMinutes
Integer iEnhancedImageMetadataEnabled
Integer iUninstallAfterBuild
String sUserDataOverride
String sImageRecipeArn
String sImageRecipeDateCreated
String sImageRecipeDescription
String sImageRecipeName
String sImageRecipeOwner
String sImageRecipeParentImage
String sImageRecipePlatform
String sV_Type
String sImageRecipeVersion
String sImageRecipeWorkingDirectory
Integer iImageTestsEnabled
Integer iImageTestsConfigurationTimeoutMinutes
String sInfrastructureConfigurationArn
String sInfrastructureConfigurationDateCreated
String sInfrastructureConfigurationDateUpdated
String sInfrastructureConfigurationDescription
Integer iHttpPutResponseHopLimit
String sHttpTokens
String sInstanceProfileName
String sKeyPair
String sS3BucketName
String sS3KeyPrefix
String sInfrastructureConfigurationName
String sResourceTagsString
String sSnsTopicArn
String sSubnetId
Integer iTerminateInstanceOnFailure
String sImageName
String sOsVersion
String sImagePlatform
String sSourcePipelineArn
String sSourcePipelineName
String sReason
String sStatus
String sImageType
String sImageVersion
String sRequestId
Integer i
Integer iCount_i
String sTemp1
Integer iTemp1
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Get Create (RefClass(cComChilkatRest)) To hoRest
If (Not(IsComObjectCreated(hoRest))) Begin
Send CreateComObject of hoRest
End
Get Create (RefClass(cComChilkatAuthAws)) To hoAuthAws
If (Not(IsComObjectCreated(hoAuthAws))) Begin
Send CreateComObject of hoAuthAws
End
Set ComAccessKey Of hoAuthAws To "AWS_ACCESS_KEY"
Set ComSecretKey Of hoAuthAws To "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.)
Set ComRegion Of hoAuthAws To "us-west-2"
Set ComServiceName Of hoAuthAws To "imagebuilder"
// SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
Get pvComObject of hoAuthAws to vAuthAws
Get ComSetAuthAws Of hoRest vAuthAws To iSuccess
// URL: https://imagebuilder.us-west-2.amazonaws.com/
// Use the same region as specified above.
Get ComConnect Of hoRest "imagebuilder.us-west-2.amazonaws.com" 443 True True To iSuccess
If (iSuccess <> True) Begin
Get ComConnectFailReason Of hoRest To iTemp1
Showln "ConnectFailReason: " iTemp1
Get ComLastErrorText Of hoRest To sTemp1
Showln sTemp1
Procedure_Return
End
Get ComAddHeader Of hoRest "Content-Type" "application/x-amz-json-1.1" To iSuccess
Get ComAddHeader Of hoRest "X-Amz-Target" "GetImage" To iSuccess
Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
Send CreateComObject of hoSbResponseBody
End
Get pvComObject of hoSbResponseBody to vSbResponseBody
Get ComFullRequestNoBodySb Of hoRest "GET" "/GetImage" vSbResponseBody To iSuccess
If (iSuccess <> True) Begin
Get ComLastErrorText Of hoRest To sTemp1
Showln sTemp1
Procedure_Return
End
Get ComResponseStatusCode Of hoRest To iRespStatusCode
Showln "response status code = " iRespStatusCode
If (iRespStatusCode <> 200) Begin
Showln "Response Header:"
Get ComResponseHeader Of hoRest To sTemp1
Showln sTemp1
Showln "Response Body:"
Get ComGetAsString Of hoSbResponseBody To sTemp1
Showln sTemp1
Procedure_Return
End
Get Create (RefClass(cComChilkatJsonObject)) To hoJResp
If (Not(IsComObjectCreated(hoJResp))) Begin
Send CreateComObject of hoJResp
End
Get pvComObject of hoSbResponseBody to vSbResponseBody
Get ComLoadSb Of hoJResp vSbResponseBody To iSuccess
// 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
Get ComStringOf Of hoJResp "image.arn" To sArn
Get ComStringOf Of hoJResp "image.buildType" To sBuildType
Get ComStringOf Of hoJResp "image.containerRecipe.arn" To sContainerRecipeArn
Get ComStringOf Of hoJResp "image.containerRecipe.containerType" To sContainerType
Get ComStringOf Of hoJResp "image.containerRecipe.dateCreated" To sDateCreated
Get ComStringOf Of hoJResp "image.containerRecipe.description" To sDescription
Get ComStringOf Of hoJResp "image.containerRecipe.dockerfileTemplateData" To sDockerfileTemplateData
Get ComIntOf Of hoJResp "image.containerRecipe.encrypted" To iEncrypted
Get ComStringOf Of hoJResp "image.containerRecipe.instanceConfiguration.image" To sImage
Get ComStringOf Of hoJResp "image.containerRecipe.kmsKeyId" To sKmsKeyId
Get ComStringOf Of hoJResp "image.containerRecipe.name" To sName
Get ComStringOf Of hoJResp "image.containerRecipe.owner" To sOwner
Get ComStringOf Of hoJResp "image.containerRecipe.parentImage" To sParentImage
Get ComStringOf Of hoJResp "image.containerRecipe.platform" To sPlatform
Get ComStringOf Of hoJResp "image.containerRecipe.tags.string" To sV_String
Get ComStringOf Of hoJResp "image.containerRecipe.targetRepository.repositoryName" To sRepositoryName
Get ComStringOf Of hoJResp "image.containerRecipe.targetRepository.service" To sService
Get ComStringOf Of hoJResp "image.containerRecipe.version" To sVersion
Get ComStringOf Of hoJResp "image.containerRecipe.workingDirectory" To sWorkingDirectory
Get ComStringOf Of hoJResp "image.dateCreated" To sImageDateCreated
Get ComStringOf Of hoJResp "image.distributionConfiguration.arn" To sDistributionConfigurationArn
Get ComStringOf Of hoJResp "image.distributionConfiguration.dateCreated" To sDistributionConfigurationDateCreated
Get ComStringOf Of hoJResp "image.distributionConfiguration.dateUpdated" To sDateUpdated
Get ComStringOf Of hoJResp "image.distributionConfiguration.description" To sDistributionConfigurationDescription
Get ComStringOf Of hoJResp "image.distributionConfiguration.name" To sDistributionConfigurationName
Get ComStringOf Of hoJResp "image.distributionConfiguration.tags.string" To sTagsString
Get ComIntOf Of hoJResp "image.distributionConfiguration.timeoutMinutes" To iTimeoutMinutes
Get ComIntOf Of hoJResp "image.enhancedImageMetadataEnabled" To iEnhancedImageMetadataEnabled
Get ComIntOf Of hoJResp "image.imageRecipe.additionalInstanceConfiguration.systemsManagerAgent.uninstallAfterBuild" To iUninstallAfterBuild
Get ComStringOf Of hoJResp "image.imageRecipe.additionalInstanceConfiguration.userDataOverride" To sUserDataOverride
Get ComStringOf Of hoJResp "image.imageRecipe.arn" To sImageRecipeArn
Get ComStringOf Of hoJResp "image.imageRecipe.dateCreated" To sImageRecipeDateCreated
Get ComStringOf Of hoJResp "image.imageRecipe.description" To sImageRecipeDescription
Get ComStringOf Of hoJResp "image.imageRecipe.name" To sImageRecipeName
Get ComStringOf Of hoJResp "image.imageRecipe.owner" To sImageRecipeOwner
Get ComStringOf Of hoJResp "image.imageRecipe.parentImage" To sImageRecipeParentImage
Get ComStringOf Of hoJResp "image.imageRecipe.platform" To sImageRecipePlatform
Get ComStringOf Of hoJResp "image.imageRecipe.tags.string" To sTagsString
Get ComStringOf Of hoJResp "image.imageRecipe.type" To sV_Type
Get ComStringOf Of hoJResp "image.imageRecipe.version" To sImageRecipeVersion
Get ComStringOf Of hoJResp "image.imageRecipe.workingDirectory" To sImageRecipeWorkingDirectory
Get ComIntOf Of hoJResp "image.imageTestsConfiguration.imageTestsEnabled" To iImageTestsEnabled
Get ComIntOf Of hoJResp "image.imageTestsConfiguration.timeoutMinutes" To iImageTestsConfigurationTimeoutMinutes
Get ComStringOf Of hoJResp "image.infrastructureConfiguration.arn" To sInfrastructureConfigurationArn
Get ComStringOf Of hoJResp "image.infrastructureConfiguration.dateCreated" To sInfrastructureConfigurationDateCreated
Get ComStringOf Of hoJResp "image.infrastructureConfiguration.dateUpdated" To sInfrastructureConfigurationDateUpdated
Get ComStringOf Of hoJResp "image.infrastructureConfiguration.description" To sInfrastructureConfigurationDescription
Get ComIntOf Of hoJResp "image.infrastructureConfiguration.instanceMetadataOptions.httpPutResponseHopLimit" To iHttpPutResponseHopLimit
Get ComStringOf Of hoJResp "image.infrastructureConfiguration.instanceMetadataOptions.httpTokens" To sHttpTokens
Get ComStringOf Of hoJResp "image.infrastructureConfiguration.instanceProfileName" To sInstanceProfileName
Get ComStringOf Of hoJResp "image.infrastructureConfiguration.keyPair" To sKeyPair
Get ComStringOf Of hoJResp "image.infrastructureConfiguration.logging.s3Logs.s3BucketName" To sS3BucketName
Get ComStringOf Of hoJResp "image.infrastructureConfiguration.logging.s3Logs.s3KeyPrefix" To sS3KeyPrefix
Get ComStringOf Of hoJResp "image.infrastructureConfiguration.name" To sInfrastructureConfigurationName
Get ComStringOf Of hoJResp "image.infrastructureConfiguration.resourceTags.string" To sResourceTagsString
Get ComStringOf Of hoJResp "image.infrastructureConfiguration.snsTopicArn" To sSnsTopicArn
Get ComStringOf Of hoJResp "image.infrastructureConfiguration.subnetId" To sSubnetId
Get ComStringOf Of hoJResp "image.infrastructureConfiguration.tags.string" To sTagsString
Get ComIntOf Of hoJResp "image.infrastructureConfiguration.terminateInstanceOnFailure" To iTerminateInstanceOnFailure
Get ComStringOf Of hoJResp "image.name" To sImageName
Get ComStringOf Of hoJResp "image.osVersion" To sOsVersion
Get ComStringOf Of hoJResp "image.platform" To sImagePlatform
Get ComStringOf Of hoJResp "image.sourcePipelineArn" To sSourcePipelineArn
Get ComStringOf Of hoJResp "image.sourcePipelineName" To sSourcePipelineName
Get ComStringOf Of hoJResp "image.state.reason" To sReason
Get ComStringOf Of hoJResp "image.state.status" To sStatus
Get ComStringOf Of hoJResp "image.tags.string" To sTagsString
Get ComStringOf Of hoJResp "image.type" To sImageType
Get ComStringOf Of hoJResp "image.version" To sImageVersion
Get ComStringOf Of hoJResp "requestId" To sRequestId
Move 0 To i
Get ComSizeOfArray Of hoJResp "image.containerRecipe.components" To iCount_i
While (i < iCount_i)
Set ComI Of hoJResp To i
Get ComStringOf Of hoJResp "image.containerRecipe.components[i].componentArn" To sComponentArn
Move 0 To j
Get ComSizeOfArray Of hoJResp "image.containerRecipe.components[i].parameters" To iCount_j
While (j < iCount_j)
Set ComJ Of hoJResp To j
Get ComStringOf Of hoJResp "image.containerRecipe.components[i].parameters[j].name" To sName
Move 0 To k
Get ComSizeOfArray Of hoJResp "image.containerRecipe.components[i].parameters[j].value" To iCount_k
While (k < iCount_k)
Set ComK Of hoJResp To k
Get ComStringOf Of hoJResp "image.containerRecipe.components[i].parameters[j].value[k]" To sStrVal
Move (k + 1) To k
Loop
Move (j + 1) To j
Loop
Move (i + 1) To i
Loop
Move 0 To i
Get ComSizeOfArray Of hoJResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings" To iCount_i
While (i < iCount_i)
Set ComI Of hoJResp To i
Get ComStringOf Of hoJResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].deviceName" To sDeviceName
Get ComIntOf Of hoJResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.deleteOnTermination" To iDeleteOnTermination
Get ComIntOf Of hoJResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.encrypted" To iEbsEncrypted
Get ComIntOf Of hoJResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.iops" To iIops
Get ComStringOf Of hoJResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.kmsKeyId" To sEbsKmsKeyId
Get ComStringOf Of hoJResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.snapshotId" To sSnapshotId
Get ComIntOf Of hoJResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.throughput" To iThroughput
Get ComIntOf Of hoJResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.volumeSize" To iVolumeSize
Get ComStringOf Of hoJResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.volumeType" To sVolumeType
Get ComStringOf Of hoJResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].noDevice" To sNoDevice
Get ComStringOf Of hoJResp "image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].virtualName" To sVirtualName
Move (i + 1) To i
Loop
Move 0 To i
Get ComSizeOfArray Of hoJResp "image.distributionConfiguration.distributions" To iCount_i
While (i < iCount_i)
Set ComI Of hoJResp To i
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.amiTags.string" To sAmiTagsString
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.description" To sAmiDistributionConfigurationDescription
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.kmsKeyId" To sAmiDistributionConfigurationKmsKeyId
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.name" To sAmiDistributionConfigurationName
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].containerDistributionConfiguration.description" To sContainerDistributionConfigurationDescription
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].containerDistributionConfiguration.targetRepository.repositoryName" To sTargetRepositoryRepositoryName
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].containerDistributionConfiguration.targetRepository.service" To sTargetRepositoryService
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].region" To sRegion
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].s3ExportConfiguration.diskImageFormat" To sDiskImageFormat
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].s3ExportConfiguration.roleName" To sRoleName
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].s3ExportConfiguration.s3Bucket" To sS3Bucket
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].s3ExportConfiguration.s3Prefix" To sS3Prefix
Move 0 To j
Get ComSizeOfArray Of hoJResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationalUnitArns" To iCount_j
While (j < iCount_j)
Set ComJ Of hoJResp To j
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationalUnitArns[j]" To sStrVal
Move (j + 1) To j
Loop
Move 0 To j
Get ComSizeOfArray Of hoJResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationArns" To iCount_j
While (j < iCount_j)
Set ComJ Of hoJResp To j
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationArns[j]" To sStrVal
Move (j + 1) To j
Loop
Move 0 To j
Get ComSizeOfArray Of hoJResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userGroups" To iCount_j
While (j < iCount_j)
Set ComJ Of hoJResp To j
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userGroups[j]" To sStrVal
Move (j + 1) To j
Loop
Move 0 To j
Get ComSizeOfArray Of hoJResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userIds" To iCount_j
While (j < iCount_j)
Set ComJ Of hoJResp To j
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userIds[j]" To sStrVal
Move (j + 1) To j
Loop
Move 0 To j
Get ComSizeOfArray Of hoJResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.targetAccountIds" To iCount_j
While (j < iCount_j)
Set ComJ Of hoJResp To j
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].amiDistributionConfiguration.targetAccountIds[j]" To sStrVal
Move (j + 1) To j
Loop
Move 0 To j
Get ComSizeOfArray Of hoJResp "image.distributionConfiguration.distributions[i].containerDistributionConfiguration.containerTags" To iCount_j
While (j < iCount_j)
Set ComJ Of hoJResp To j
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].containerDistributionConfiguration.containerTags[j]" To sStrVal
Move (j + 1) To j
Loop
Move 0 To j
Get ComSizeOfArray Of hoJResp "image.distributionConfiguration.distributions[i].fastLaunchConfigurations" To iCount_j
While (j < iCount_j)
Set ComJ Of hoJResp To j
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].accountId" To sAccountId
Get ComIntOf Of hoJResp "image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].enabled" To iEnabled
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].launchTemplate.launchTemplateId" To sLaunchTemplateId
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].launchTemplate.launchTemplateName" To sLaunchTemplateName
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].launchTemplate.launchTemplateVersion" To sLaunchTemplateVersion
Get ComIntOf Of hoJResp "image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].maxParallelLaunches" To iMaxParallelLaunches
Get ComIntOf Of hoJResp "image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].snapshotConfiguration.targetResourceCount" To iTargetResourceCount
Move (j + 1) To j
Loop
Move 0 To j
Get ComSizeOfArray Of hoJResp "image.distributionConfiguration.distributions[i].launchTemplateConfigurations" To iCount_j
While (j < iCount_j)
Set ComJ Of hoJResp To j
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].launchTemplateConfigurations[j].accountId" To sAccountId
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].launchTemplateConfigurations[j].launchTemplateId" To sLaunchTemplateId
Get ComIntOf Of hoJResp "image.distributionConfiguration.distributions[i].launchTemplateConfigurations[j].setDefaultVersion" To iSetDefaultVersion
Move (j + 1) To j
Loop
Move 0 To j
Get ComSizeOfArray Of hoJResp "image.distributionConfiguration.distributions[i].licenseConfigurationArns" To iCount_j
While (j < iCount_j)
Set ComJ Of hoJResp To j
Get ComStringOf Of hoJResp "image.distributionConfiguration.distributions[i].licenseConfigurationArns[j]" To sStrVal
Move (j + 1) To j
Loop
Move (i + 1) To i
Loop
Move 0 To i
Get ComSizeOfArray Of hoJResp "image.imageRecipe.blockDeviceMappings" To iCount_i
While (i < iCount_i)
Set ComI Of hoJResp To i
Get ComStringOf Of hoJResp "image.imageRecipe.blockDeviceMappings[i].deviceName" To sDeviceName
Get ComIntOf Of hoJResp "image.imageRecipe.blockDeviceMappings[i].ebs.deleteOnTermination" To iEbsDeleteOnTermination
Get ComIntOf Of hoJResp "image.imageRecipe.blockDeviceMappings[i].ebs.encrypted" To iEbsEncrypted
Get ComIntOf Of hoJResp "image.imageRecipe.blockDeviceMappings[i].ebs.iops" To iEbsIops
Get ComStringOf Of hoJResp "image.imageRecipe.blockDeviceMappings[i].ebs.kmsKeyId" To sEbsKmsKeyId
Get ComStringOf Of hoJResp "image.imageRecipe.blockDeviceMappings[i].ebs.snapshotId" To sEbsSnapshotId
Get ComIntOf Of hoJResp "image.imageRecipe.blockDeviceMappings[i].ebs.throughput" To iEbsThroughput
Get ComIntOf Of hoJResp "image.imageRecipe.blockDeviceMappings[i].ebs.volumeSize" To iEbsVolumeSize
Get ComStringOf Of hoJResp "image.imageRecipe.blockDeviceMappings[i].ebs.volumeType" To sEbsVolumeType
Get ComStringOf Of hoJResp "image.imageRecipe.blockDeviceMappings[i].noDevice" To sNoDevice
Get ComStringOf Of hoJResp "image.imageRecipe.blockDeviceMappings[i].virtualName" To sVirtualName
Move (i + 1) To i
Loop
Move 0 To i
Get ComSizeOfArray Of hoJResp "image.imageRecipe.components" To iCount_i
While (i < iCount_i)
Set ComI Of hoJResp To i
Get ComStringOf Of hoJResp "image.imageRecipe.components[i].componentArn" To sComponentArn
Move 0 To j
Get ComSizeOfArray Of hoJResp "image.imageRecipe.components[i].parameters" To iCount_j
While (j < iCount_j)
Set ComJ Of hoJResp To j
Get ComStringOf Of hoJResp "image.imageRecipe.components[i].parameters[j].name" To sName
Move 0 To k
Get ComSizeOfArray Of hoJResp "image.imageRecipe.components[i].parameters[j].value" To iCount_k
While (k < iCount_k)
Set ComK Of hoJResp To k
Get ComStringOf Of hoJResp "image.imageRecipe.components[i].parameters[j].value[k]" To sStrVal
Move (k + 1) To k
Loop
Move (j + 1) To j
Loop
Move (i + 1) To i
Loop
Move 0 To i
Get ComSizeOfArray Of hoJResp "image.infrastructureConfiguration.instanceTypes" To iCount_i
While (i < iCount_i)
Set ComI Of hoJResp To i
Get ComStringOf Of hoJResp "image.infrastructureConfiguration.instanceTypes[i]" To sStrVal
Move (i + 1) To i
Loop
Move 0 To i
Get ComSizeOfArray Of hoJResp "image.infrastructureConfiguration.securityGroupIds" To iCount_i
While (i < iCount_i)
Set ComI Of hoJResp To i
Get ComStringOf Of hoJResp "image.infrastructureConfiguration.securityGroupIds[i]" To sStrVal
Move (i + 1) To i
Loop
Move 0 To i
Get ComSizeOfArray Of hoJResp "image.outputResources.amis" To iCount_i
While (i < iCount_i)
Set ComI Of hoJResp To i
Get ComStringOf Of hoJResp "image.outputResources.amis[i].accountId" To sAccountId
Get ComStringOf Of hoJResp "image.outputResources.amis[i].description" To sDescription
Get ComStringOf Of hoJResp "image.outputResources.amis[i].image" To sImage
Get ComStringOf Of hoJResp "image.outputResources.amis[i].name" To sName
Get ComStringOf Of hoJResp "image.outputResources.amis[i].region" To sRegion
Get ComStringOf Of hoJResp "image.outputResources.amis[i].state.reason" To sStateReason
Get ComStringOf Of hoJResp "image.outputResources.amis[i].state.status" To sStateStatus
Move (i + 1) To i
Loop
Move 0 To i
Get ComSizeOfArray Of hoJResp "image.outputResources.containers" To iCount_i
While (i < iCount_i)
Set ComI Of hoJResp To i
Get ComStringOf Of hoJResp "image.outputResources.containers[i].region" To sRegion
Move 0 To j
Get ComSizeOfArray Of hoJResp "image.outputResources.containers[i].imageUris" To iCount_j
While (j < iCount_j)
Set ComJ Of hoJResp To j
Get ComStringOf Of hoJResp "image.outputResources.containers[i].imageUris[j]" To sStrVal
Move (j + 1) To j
Loop
Move (i + 1) To i
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"
// }
End_Procedure