GetImage Foxpro Example
LOCAL loRest
LOCAL lnSuccess
LOCAL loAuthAws
LOCAL loSbResponseBody
LOCAL lnRespStatusCode
LOCAL loJResp
LOCAL lcComponentArn
LOCAL j
LOCAL lnCount_j
LOCAL lcName
LOCAL k
LOCAL lnCount_k
LOCAL lcStrVal
LOCAL lcDeviceName
LOCAL lnDeleteOnTermination
LOCAL lnEbsEncrypted
LOCAL lnIops
LOCAL lcEbsKmsKeyId
LOCAL lcSnapshotId
LOCAL lnThroughput
LOCAL lnVolumeSize
LOCAL lcVolumeType
LOCAL lcNoDevice
LOCAL lcVirtualName
LOCAL lcAmiTagsString
LOCAL lcAmiDistributionConfigurationDescription
LOCAL lcAmiDistributionConfigurationKmsKeyId
LOCAL lcAmiDistributionConfigurationName
LOCAL lcContainerDistributionConfigurationDescription
LOCAL lcTargetRepositoryRepositoryName
LOCAL lcTargetRepositoryService
LOCAL lcRegion
LOCAL lcDiskImageFormat
LOCAL lcRoleName
LOCAL lcS3Bucket
LOCAL lcS3Prefix
LOCAL lcAccountId
LOCAL lnEnabled
LOCAL lcLaunchTemplateId
LOCAL lcLaunchTemplateName
LOCAL lcLaunchTemplateVersion
LOCAL lnMaxParallelLaunches
LOCAL lnTargetResourceCount
LOCAL lcLaunchTemplateId
LOCAL lnSetDefaultVersion
LOCAL lnEbsDeleteOnTermination
LOCAL lnEbsIops
LOCAL lcEbsSnapshotId
LOCAL lnEbsThroughput
LOCAL lnEbsVolumeSize
LOCAL lcEbsVolumeType
LOCAL lcDescription
LOCAL lcImage
LOCAL lcStateReason
LOCAL lcStateStatus
LOCAL lcArn
LOCAL lcBuildType
LOCAL lcContainerRecipeArn
LOCAL lcContainerType
LOCAL lcDateCreated
LOCAL lcDescription
LOCAL lcDockerfileTemplateData
LOCAL lnEncrypted
LOCAL lcImage
LOCAL lcKmsKeyId
LOCAL lcName
LOCAL lcOwner
LOCAL lcParentImage
LOCAL lcPlatform
LOCAL lcV_String
LOCAL lcRepositoryName
LOCAL lcService
LOCAL lcVersion
LOCAL lcWorkingDirectory
LOCAL lcImageDateCreated
LOCAL lcDistributionConfigurationArn
LOCAL lcDistributionConfigurationDateCreated
LOCAL lcDateUpdated
LOCAL lcDistributionConfigurationDescription
LOCAL lcDistributionConfigurationName
LOCAL lcTagsString
LOCAL lnTimeoutMinutes
LOCAL lnEnhancedImageMetadataEnabled
LOCAL lnUninstallAfterBuild
LOCAL lcUserDataOverride
LOCAL lcImageRecipeArn
LOCAL lcImageRecipeDateCreated
LOCAL lcImageRecipeDescription
LOCAL lcImageRecipeName
LOCAL lcImageRecipeOwner
LOCAL lcImageRecipeParentImage
LOCAL lcImageRecipePlatform
LOCAL lcV_Type
LOCAL lcImageRecipeVersion
LOCAL lcImageRecipeWorkingDirectory
LOCAL lnImageTestsEnabled
LOCAL lnImageTestsConfigurationTimeoutMinutes
LOCAL lcInfrastructureConfigurationArn
LOCAL lcInfrastructureConfigurationDateCreated
LOCAL lcInfrastructureConfigurationDateUpdated
LOCAL lcInfrastructureConfigurationDescription
LOCAL lnHttpPutResponseHopLimit
LOCAL lcHttpTokens
LOCAL lcInstanceProfileName
LOCAL lcKeyPair
LOCAL lcS3BucketName
LOCAL lcS3KeyPrefix
LOCAL lcInfrastructureConfigurationName
LOCAL lcResourceTagsString
LOCAL lcSnsTopicArn
LOCAL lcSubnetId
LOCAL lnTerminateInstanceOnFailure
LOCAL lcImageName
LOCAL lcOsVersion
LOCAL lcImagePlatform
LOCAL lcSourcePipelineArn
LOCAL lcSourcePipelineName
LOCAL lcReason
LOCAL lcStatus
LOCAL lcImageType
LOCAL lcImageVersion
LOCAL lcRequestId
LOCAL i
LOCAL lnCount_i
* This example requires the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
loRest = CreateObject('Chilkat_9_5_0.Rest')
loAuthAws = CreateObject('Chilkat_9_5_0.AuthAws')
loAuthAws.AccessKey = "AWS_ACCESS_KEY"
loAuthAws.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.)
loAuthAws.Region = "us-west-2"
loAuthAws.ServiceName = "imagebuilder"
* SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
loRest.SetAuthAws(loAuthAws)
* URL: https://imagebuilder.us-west-2.amazonaws.com/
* Use the same region as specified above.
lnSuccess = loRest.Connect("imagebuilder.us-west-2.amazonaws.com",443,1,1)
IF (lnSuccess <> 1) THEN
? "ConnectFailReason: " + STR(loRest.ConnectFailReason)
? loRest.LastErrorText
RELEASE loRest
RELEASE loAuthAws
CANCEL
ENDIF
loRest.AddHeader("Content-Type","application/x-amz-json-1.1")
loRest.AddHeader("X-Amz-Target","GetImage")
loSbResponseBody = CreateObject('Chilkat_9_5_0.StringBuilder')
lnSuccess = loRest.FullRequestNoBodySb("GET","/GetImage",loSbResponseBody)
IF (lnSuccess <> 1) THEN
? loRest.LastErrorText
RELEASE loRest
RELEASE loAuthAws
RELEASE loSbResponseBody
CANCEL
ENDIF
lnRespStatusCode = loRest.ResponseStatusCode
? "response status code = " + STR(lnRespStatusCode)
IF (lnRespStatusCode <> 200) THEN
? "Response Header:"
? loRest.ResponseHeader
? "Response Body:"
? loSbResponseBody.GetAsString()
RELEASE loRest
RELEASE loAuthAws
RELEASE loSbResponseBody
CANCEL
ENDIF
loJResp = CreateObject('Chilkat_9_5_0.JsonObject')
loJResp.LoadSb(loSbResponseBody)
* 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
lcArn = loJResp.StringOf("image.arn")
lcBuildType = loJResp.StringOf("image.buildType")
lcContainerRecipeArn = loJResp.StringOf("image.containerRecipe.arn")
lcContainerType = loJResp.StringOf("image.containerRecipe.containerType")
lcDateCreated = loJResp.StringOf("image.containerRecipe.dateCreated")
lcDescription = loJResp.StringOf("image.containerRecipe.description")
lcDockerfileTemplateData = loJResp.StringOf("image.containerRecipe.dockerfileTemplateData")
lnEncrypted = loJResp.IntOf("image.containerRecipe.encrypted")
lcImage = loJResp.StringOf("image.containerRecipe.instanceConfiguration.image")
lcKmsKeyId = loJResp.StringOf("image.containerRecipe.kmsKeyId")
lcName = loJResp.StringOf("image.containerRecipe.name")
lcOwner = loJResp.StringOf("image.containerRecipe.owner")
lcParentImage = loJResp.StringOf("image.containerRecipe.parentImage")
lcPlatform = loJResp.StringOf("image.containerRecipe.platform")
lcV_String = loJResp.StringOf("image.containerRecipe.tags.string")
lcRepositoryName = loJResp.StringOf("image.containerRecipe.targetRepository.repositoryName")
lcService = loJResp.StringOf("image.containerRecipe.targetRepository.service")
lcVersion = loJResp.StringOf("image.containerRecipe.version")
lcWorkingDirectory = loJResp.StringOf("image.containerRecipe.workingDirectory")
lcImageDateCreated = loJResp.StringOf("image.dateCreated")
lcDistributionConfigurationArn = loJResp.StringOf("image.distributionConfiguration.arn")
lcDistributionConfigurationDateCreated = loJResp.StringOf("image.distributionConfiguration.dateCreated")
lcDateUpdated = loJResp.StringOf("image.distributionConfiguration.dateUpdated")
lcDistributionConfigurationDescription = loJResp.StringOf("image.distributionConfiguration.description")
lcDistributionConfigurationName = loJResp.StringOf("image.distributionConfiguration.name")
lcTagsString = loJResp.StringOf("image.distributionConfiguration.tags.string")
lnTimeoutMinutes = loJResp.IntOf("image.distributionConfiguration.timeoutMinutes")
lnEnhancedImageMetadataEnabled = loJResp.IntOf("image.enhancedImageMetadataEnabled")
lnUninstallAfterBuild = loJResp.IntOf("image.imageRecipe.additionalInstanceConfiguration.systemsManagerAgent.uninstallAfterBuild")
lcUserDataOverride = loJResp.StringOf("image.imageRecipe.additionalInstanceConfiguration.userDataOverride")
lcImageRecipeArn = loJResp.StringOf("image.imageRecipe.arn")
lcImageRecipeDateCreated = loJResp.StringOf("image.imageRecipe.dateCreated")
lcImageRecipeDescription = loJResp.StringOf("image.imageRecipe.description")
lcImageRecipeName = loJResp.StringOf("image.imageRecipe.name")
lcImageRecipeOwner = loJResp.StringOf("image.imageRecipe.owner")
lcImageRecipeParentImage = loJResp.StringOf("image.imageRecipe.parentImage")
lcImageRecipePlatform = loJResp.StringOf("image.imageRecipe.platform")
lcTagsString = loJResp.StringOf("image.imageRecipe.tags.string")
lcV_Type = loJResp.StringOf("image.imageRecipe.type")
lcImageRecipeVersion = loJResp.StringOf("image.imageRecipe.version")
lcImageRecipeWorkingDirectory = loJResp.StringOf("image.imageRecipe.workingDirectory")
lnImageTestsEnabled = loJResp.IntOf("image.imageTestsConfiguration.imageTestsEnabled")
lnImageTestsConfigurationTimeoutMinutes = loJResp.IntOf("image.imageTestsConfiguration.timeoutMinutes")
lcInfrastructureConfigurationArn = loJResp.StringOf("image.infrastructureConfiguration.arn")
lcInfrastructureConfigurationDateCreated = loJResp.StringOf("image.infrastructureConfiguration.dateCreated")
lcInfrastructureConfigurationDateUpdated = loJResp.StringOf("image.infrastructureConfiguration.dateUpdated")
lcInfrastructureConfigurationDescription = loJResp.StringOf("image.infrastructureConfiguration.description")
lnHttpPutResponseHopLimit = loJResp.IntOf("image.infrastructureConfiguration.instanceMetadataOptions.httpPutResponseHopLimit")
lcHttpTokens = loJResp.StringOf("image.infrastructureConfiguration.instanceMetadataOptions.httpTokens")
lcInstanceProfileName = loJResp.StringOf("image.infrastructureConfiguration.instanceProfileName")
lcKeyPair = loJResp.StringOf("image.infrastructureConfiguration.keyPair")
lcS3BucketName = loJResp.StringOf("image.infrastructureConfiguration.logging.s3Logs.s3BucketName")
lcS3KeyPrefix = loJResp.StringOf("image.infrastructureConfiguration.logging.s3Logs.s3KeyPrefix")
lcInfrastructureConfigurationName = loJResp.StringOf("image.infrastructureConfiguration.name")
lcResourceTagsString = loJResp.StringOf("image.infrastructureConfiguration.resourceTags.string")
lcSnsTopicArn = loJResp.StringOf("image.infrastructureConfiguration.snsTopicArn")
lcSubnetId = loJResp.StringOf("image.infrastructureConfiguration.subnetId")
lcTagsString = loJResp.StringOf("image.infrastructureConfiguration.tags.string")
lnTerminateInstanceOnFailure = loJResp.IntOf("image.infrastructureConfiguration.terminateInstanceOnFailure")
lcImageName = loJResp.StringOf("image.name")
lcOsVersion = loJResp.StringOf("image.osVersion")
lcImagePlatform = loJResp.StringOf("image.platform")
lcSourcePipelineArn = loJResp.StringOf("image.sourcePipelineArn")
lcSourcePipelineName = loJResp.StringOf("image.sourcePipelineName")
lcReason = loJResp.StringOf("image.state.reason")
lcStatus = loJResp.StringOf("image.state.status")
lcTagsString = loJResp.StringOf("image.tags.string")
lcImageType = loJResp.StringOf("image.type")
lcImageVersion = loJResp.StringOf("image.version")
lcRequestId = loJResp.StringOf("requestId")
i = 0
lnCount_i = loJResp.SizeOfArray("image.containerRecipe.components")
DO WHILE i < lnCount_i
loJResp.I = i
lcComponentArn = loJResp.StringOf("image.containerRecipe.components[i].componentArn")
j = 0
lnCount_j = loJResp.SizeOfArray("image.containerRecipe.components[i].parameters")
DO WHILE j < lnCount_j
loJResp.J = j
lcName = loJResp.StringOf("image.containerRecipe.components[i].parameters[j].name")
k = 0
lnCount_k = loJResp.SizeOfArray("image.containerRecipe.components[i].parameters[j].value")
DO WHILE k < lnCount_k
loJResp.K = k
lcStrVal = loJResp.StringOf("image.containerRecipe.components[i].parameters[j].value[k]")
k = k + 1
ENDDO
j = j + 1
ENDDO
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("image.containerRecipe.instanceConfiguration.blockDeviceMappings")
DO WHILE i < lnCount_i
loJResp.I = i
lcDeviceName = loJResp.StringOf("image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].deviceName")
lnDeleteOnTermination = loJResp.IntOf("image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.deleteOnTermination")
lnEbsEncrypted = loJResp.IntOf("image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.encrypted")
lnIops = loJResp.IntOf("image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.iops")
lcEbsKmsKeyId = loJResp.StringOf("image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.kmsKeyId")
lcSnapshotId = loJResp.StringOf("image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.snapshotId")
lnThroughput = loJResp.IntOf("image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.throughput")
lnVolumeSize = loJResp.IntOf("image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.volumeSize")
lcVolumeType = loJResp.StringOf("image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].ebs.volumeType")
lcNoDevice = loJResp.StringOf("image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].noDevice")
lcVirtualName = loJResp.StringOf("image.containerRecipe.instanceConfiguration.blockDeviceMappings[i].virtualName")
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("image.distributionConfiguration.distributions")
DO WHILE i < lnCount_i
loJResp.I = i
lcAmiTagsString = loJResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.amiTags.string")
lcAmiDistributionConfigurationDescription = loJResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.description")
lcAmiDistributionConfigurationKmsKeyId = loJResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.kmsKeyId")
lcAmiDistributionConfigurationName = loJResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.name")
lcContainerDistributionConfigurationDescription = loJResp.StringOf("image.distributionConfiguration.distributions[i].containerDistributionConfiguration.description")
lcTargetRepositoryRepositoryName = loJResp.StringOf("image.distributionConfiguration.distributions[i].containerDistributionConfiguration.targetRepository.repositoryName")
lcTargetRepositoryService = loJResp.StringOf("image.distributionConfiguration.distributions[i].containerDistributionConfiguration.targetRepository.service")
lcRegion = loJResp.StringOf("image.distributionConfiguration.distributions[i].region")
lcDiskImageFormat = loJResp.StringOf("image.distributionConfiguration.distributions[i].s3ExportConfiguration.diskImageFormat")
lcRoleName = loJResp.StringOf("image.distributionConfiguration.distributions[i].s3ExportConfiguration.roleName")
lcS3Bucket = loJResp.StringOf("image.distributionConfiguration.distributions[i].s3ExportConfiguration.s3Bucket")
lcS3Prefix = loJResp.StringOf("image.distributionConfiguration.distributions[i].s3ExportConfiguration.s3Prefix")
j = 0
lnCount_j = loJResp.SizeOfArray("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationalUnitArns")
DO WHILE j < lnCount_j
loJResp.J = j
lcStrVal = loJResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationalUnitArns[j]")
j = j + 1
ENDDO
j = 0
lnCount_j = loJResp.SizeOfArray("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationArns")
DO WHILE j < lnCount_j
loJResp.J = j
lcStrVal = loJResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.organizationArns[j]")
j = j + 1
ENDDO
j = 0
lnCount_j = loJResp.SizeOfArray("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userGroups")
DO WHILE j < lnCount_j
loJResp.J = j
lcStrVal = loJResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userGroups[j]")
j = j + 1
ENDDO
j = 0
lnCount_j = loJResp.SizeOfArray("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userIds")
DO WHILE j < lnCount_j
loJResp.J = j
lcStrVal = loJResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.launchPermission.userIds[j]")
j = j + 1
ENDDO
j = 0
lnCount_j = loJResp.SizeOfArray("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.targetAccountIds")
DO WHILE j < lnCount_j
loJResp.J = j
lcStrVal = loJResp.StringOf("image.distributionConfiguration.distributions[i].amiDistributionConfiguration.targetAccountIds[j]")
j = j + 1
ENDDO
j = 0
lnCount_j = loJResp.SizeOfArray("image.distributionConfiguration.distributions[i].containerDistributionConfiguration.containerTags")
DO WHILE j < lnCount_j
loJResp.J = j
lcStrVal = loJResp.StringOf("image.distributionConfiguration.distributions[i].containerDistributionConfiguration.containerTags[j]")
j = j + 1
ENDDO
j = 0
lnCount_j = loJResp.SizeOfArray("image.distributionConfiguration.distributions[i].fastLaunchConfigurations")
DO WHILE j < lnCount_j
loJResp.J = j
lcAccountId = loJResp.StringOf("image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].accountId")
lnEnabled = loJResp.IntOf("image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].enabled")
lcLaunchTemplateId = loJResp.StringOf("image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].launchTemplate.launchTemplateId")
lcLaunchTemplateName = loJResp.StringOf("image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].launchTemplate.launchTemplateName")
lcLaunchTemplateVersion = loJResp.StringOf("image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].launchTemplate.launchTemplateVersion")
lnMaxParallelLaunches = loJResp.IntOf("image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].maxParallelLaunches")
lnTargetResourceCount = loJResp.IntOf("image.distributionConfiguration.distributions[i].fastLaunchConfigurations[j].snapshotConfiguration.targetResourceCount")
j = j + 1
ENDDO
j = 0
lnCount_j = loJResp.SizeOfArray("image.distributionConfiguration.distributions[i].launchTemplateConfigurations")
DO WHILE j < lnCount_j
loJResp.J = j
lcAccountId = loJResp.StringOf("image.distributionConfiguration.distributions[i].launchTemplateConfigurations[j].accountId")
lcLaunchTemplateId = loJResp.StringOf("image.distributionConfiguration.distributions[i].launchTemplateConfigurations[j].launchTemplateId")
lnSetDefaultVersion = loJResp.IntOf("image.distributionConfiguration.distributions[i].launchTemplateConfigurations[j].setDefaultVersion")
j = j + 1
ENDDO
j = 0
lnCount_j = loJResp.SizeOfArray("image.distributionConfiguration.distributions[i].licenseConfigurationArns")
DO WHILE j < lnCount_j
loJResp.J = j
lcStrVal = loJResp.StringOf("image.distributionConfiguration.distributions[i].licenseConfigurationArns[j]")
j = j + 1
ENDDO
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("image.imageRecipe.blockDeviceMappings")
DO WHILE i < lnCount_i
loJResp.I = i
lcDeviceName = loJResp.StringOf("image.imageRecipe.blockDeviceMappings[i].deviceName")
lnEbsDeleteOnTermination = loJResp.IntOf("image.imageRecipe.blockDeviceMappings[i].ebs.deleteOnTermination")
lnEbsEncrypted = loJResp.IntOf("image.imageRecipe.blockDeviceMappings[i].ebs.encrypted")
lnEbsIops = loJResp.IntOf("image.imageRecipe.blockDeviceMappings[i].ebs.iops")
lcEbsKmsKeyId = loJResp.StringOf("image.imageRecipe.blockDeviceMappings[i].ebs.kmsKeyId")
lcEbsSnapshotId = loJResp.StringOf("image.imageRecipe.blockDeviceMappings[i].ebs.snapshotId")
lnEbsThroughput = loJResp.IntOf("image.imageRecipe.blockDeviceMappings[i].ebs.throughput")
lnEbsVolumeSize = loJResp.IntOf("image.imageRecipe.blockDeviceMappings[i].ebs.volumeSize")
lcEbsVolumeType = loJResp.StringOf("image.imageRecipe.blockDeviceMappings[i].ebs.volumeType")
lcNoDevice = loJResp.StringOf("image.imageRecipe.blockDeviceMappings[i].noDevice")
lcVirtualName = loJResp.StringOf("image.imageRecipe.blockDeviceMappings[i].virtualName")
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("image.imageRecipe.components")
DO WHILE i < lnCount_i
loJResp.I = i
lcComponentArn = loJResp.StringOf("image.imageRecipe.components[i].componentArn")
j = 0
lnCount_j = loJResp.SizeOfArray("image.imageRecipe.components[i].parameters")
DO WHILE j < lnCount_j
loJResp.J = j
lcName = loJResp.StringOf("image.imageRecipe.components[i].parameters[j].name")
k = 0
lnCount_k = loJResp.SizeOfArray("image.imageRecipe.components[i].parameters[j].value")
DO WHILE k < lnCount_k
loJResp.K = k
lcStrVal = loJResp.StringOf("image.imageRecipe.components[i].parameters[j].value[k]")
k = k + 1
ENDDO
j = j + 1
ENDDO
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("image.infrastructureConfiguration.instanceTypes")
DO WHILE i < lnCount_i
loJResp.I = i
lcStrVal = loJResp.StringOf("image.infrastructureConfiguration.instanceTypes[i]")
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("image.infrastructureConfiguration.securityGroupIds")
DO WHILE i < lnCount_i
loJResp.I = i
lcStrVal = loJResp.StringOf("image.infrastructureConfiguration.securityGroupIds[i]")
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("image.outputResources.amis")
DO WHILE i < lnCount_i
loJResp.I = i
lcAccountId = loJResp.StringOf("image.outputResources.amis[i].accountId")
lcDescription = loJResp.StringOf("image.outputResources.amis[i].description")
lcImage = loJResp.StringOf("image.outputResources.amis[i].image")
lcName = loJResp.StringOf("image.outputResources.amis[i].name")
lcRegion = loJResp.StringOf("image.outputResources.amis[i].region")
lcStateReason = loJResp.StringOf("image.outputResources.amis[i].state.reason")
lcStateStatus = loJResp.StringOf("image.outputResources.amis[i].state.status")
i = i + 1
ENDDO
i = 0
lnCount_i = loJResp.SizeOfArray("image.outputResources.containers")
DO WHILE i < lnCount_i
loJResp.I = i
lcRegion = loJResp.StringOf("image.outputResources.containers[i].region")
j = 0
lnCount_j = loJResp.SizeOfArray("image.outputResources.containers[i].imageUris")
DO WHILE j < lnCount_j
loJResp.J = j
lcStrVal = loJResp.StringOf("image.outputResources.containers[i].imageUris[j]")
j = j + 1
ENDDO
i = i + 1
ENDDO
* 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"
* }
RELEASE loRest
RELEASE loAuthAws
RELEASE loSbResponseBody
RELEASE loJResp