GetImage Node.js Example
var os = require('os');
if (os.platform() == 'win32') {
if (os.arch() == 'ia32') {
var chilkat = require('@chilkat/ck-node17-win-ia32');
} else {
var chilkat = require('@chilkat/ck-node17-win64');
}
} else if (os.platform() == 'linux') {
if (os.arch() == 'arm') {
var chilkat = require('@chilkat/ck-node17-arm');
} else if (os.arch() == 'x86') {
var chilkat = require('@chilkat/ck-node17-linux32');
} else {
var chilkat = require('@chilkat/ck-node17-linux64');
}
} else if (os.platform() == 'darwin') {
var chilkat = require('@chilkat/ck-node17-macosx');
}
function chilkatExample() {
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
var rest = new chilkat.Rest();
var success;
var authAws = new chilkat.AuthAws();
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
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) {
console.log("ConnectFailReason: " + rest.ConnectFailReason);
console.log(rest.LastErrorText);
return;
}
rest.AddHeader("Content-Type","application/x-amz-json-1.1");
rest.AddHeader("X-Amz-Target","GetImage");
var sbResponseBody = new chilkat.StringBuilder();
success = rest.FullRequestNoBodySb("GET","/GetImage",sbResponseBody);
if (success !== true) {
console.log(rest.LastErrorText);
return;
}
var respStatusCode = rest.ResponseStatusCode;
console.log("response status code = " + respStatusCode);
if (respStatusCode !== 200) {
console.log("Response Header:");
console.log(rest.ResponseHeader);
console.log("Response Body:");
console.log(sbResponseBody.GetAsString());
return;
}
var jResp = new chilkat.JsonObject();
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
var componentArn;
var j;
var count_j;
var name;
var k;
var count_k;
var strVal;
var deviceName;
var DeleteOnTermination;
var ebsEncrypted;
var Iops;
var ebsKmsKeyId;
var SnapshotId;
var Throughput;
var VolumeSize;
var VolumeType;
var noDevice;
var virtualName;
var AmiTagsString;
var amiDistributionConfigurationDescription;
var amiDistributionConfigurationKmsKeyId;
var amiDistributionConfigurationName;
var containerDistributionConfigurationDescription;
var TargetRepositoryRepositoryName;
var TargetRepositoryService;
var region;
var DiskImageFormat;
var RoleName;
var S3Bucket;
var S3Prefix;
var accountId;
var enabled;
var LaunchTemplateId;
var LaunchTemplateName;
var LaunchTemplateVersion;
var maxParallelLaunches;
var TargetResourceCount;
var launchTemplateId;
var setDefaultVersion;
var ebsDeleteOnTermination;
var ebsIops;
var ebsSnapshotId;
var ebsThroughput;
var ebsVolumeSize;
var ebsVolumeType;
var description;
var image;
var stateReason;
var stateStatus;
var Arn = jResp.StringOf("image.arn");
var BuildType = jResp.StringOf("image.buildType");
var ContainerRecipeArn = jResp.StringOf("image.containerRecipe.arn");
var ContainerType = jResp.StringOf("image.containerRecipe.containerType");
var DateCreated = jResp.StringOf("image.containerRecipe.dateCreated");
var Description = jResp.StringOf("image.containerRecipe.description");
var DockerfileTemplateData = jResp.StringOf("image.containerRecipe.dockerfileTemplateData");
var Encrypted = jResp.IntOf("image.containerRecipe.encrypted");
var Image = jResp.StringOf("image.containerRecipe.instanceConfiguration.image");
var KmsKeyId = jResp.StringOf("image.containerRecipe.kmsKeyId");
var Name = jResp.StringOf("image.containerRecipe.name");
var Owner = jResp.StringOf("image.containerRecipe.owner");
var ParentImage = jResp.StringOf("image.containerRecipe.parentImage");
var Platform = jResp.StringOf("image.containerRecipe.platform");
var v_String = jResp.StringOf("image.containerRecipe.tags.string");
var RepositoryName = jResp.StringOf("image.containerRecipe.targetRepository.repositoryName");
var Service = jResp.StringOf("image.containerRecipe.targetRepository.service");
var Version = jResp.StringOf("image.containerRecipe.version");
var WorkingDirectory = jResp.StringOf("image.containerRecipe.workingDirectory");
var imageDateCreated = jResp.StringOf("image.dateCreated");
var DistributionConfigurationArn = jResp.StringOf("image.distributionConfiguration.arn");
var DistributionConfigurationDateCreated = jResp.StringOf("image.distributionConfiguration.dateCreated");
var DateUpdated = jResp.StringOf("image.distributionConfiguration.dateUpdated");
var DistributionConfigurationDescription = jResp.StringOf("image.distributionConfiguration.description");
var DistributionConfigurationName = jResp.StringOf("image.distributionConfiguration.name");
var TagsString = jResp.StringOf("image.distributionConfiguration.tags.string");
var TimeoutMinutes = jResp.IntOf("image.distributionConfiguration.timeoutMinutes");
var EnhancedImageMetadataEnabled = jResp.IntOf("image.enhancedImageMetadataEnabled");
var UninstallAfterBuild = jResp.IntOf("image.imageRecipe.additionalInstanceConfiguration.systemsManagerAgent.uninstallAfterBuild");
var UserDataOverride = jResp.StringOf("image.imageRecipe.additionalInstanceConfiguration.userDataOverride");
var ImageRecipeArn = jResp.StringOf("image.imageRecipe.arn");
var ImageRecipeDateCreated = jResp.StringOf("image.imageRecipe.dateCreated");
var ImageRecipeDescription = jResp.StringOf("image.imageRecipe.description");
var ImageRecipeName = jResp.StringOf("image.imageRecipe.name");
var ImageRecipeOwner = jResp.StringOf("image.imageRecipe.owner");
var ImageRecipeParentImage = jResp.StringOf("image.imageRecipe.parentImage");
var ImageRecipePlatform = jResp.StringOf("image.imageRecipe.platform");
TagsString = jResp.StringOf("image.imageRecipe.tags.string");
var v_Type = jResp.StringOf("image.imageRecipe.type");
var ImageRecipeVersion = jResp.StringOf("image.imageRecipe.version");
var ImageRecipeWorkingDirectory = jResp.StringOf("image.imageRecipe.workingDirectory");
var ImageTestsEnabled = jResp.IntOf("image.imageTestsConfiguration.imageTestsEnabled");
var ImageTestsConfigurationTimeoutMinutes = jResp.IntOf("image.imageTestsConfiguration.timeoutMinutes");
var InfrastructureConfigurationArn = jResp.StringOf("image.infrastructureConfiguration.arn");
var InfrastructureConfigurationDateCreated = jResp.StringOf("image.infrastructureConfiguration.dateCreated");
var InfrastructureConfigurationDateUpdated = jResp.StringOf("image.infrastructureConfiguration.dateUpdated");
var InfrastructureConfigurationDescription = jResp.StringOf("image.infrastructureConfiguration.description");
var HttpPutResponseHopLimit = jResp.IntOf("image.infrastructureConfiguration.instanceMetadataOptions.httpPutResponseHopLimit");
var HttpTokens = jResp.StringOf("image.infrastructureConfiguration.instanceMetadataOptions.httpTokens");
var InstanceProfileName = jResp.StringOf("image.infrastructureConfiguration.instanceProfileName");
var KeyPair = jResp.StringOf("image.infrastructureConfiguration.keyPair");
var S3BucketName = jResp.StringOf("image.infrastructureConfiguration.logging.s3Logs.s3BucketName");
var S3KeyPrefix = jResp.StringOf("image.infrastructureConfiguration.logging.s3Logs.s3KeyPrefix");
var InfrastructureConfigurationName = jResp.StringOf("image.infrastructureConfiguration.name");
var ResourceTagsString = jResp.StringOf("image.infrastructureConfiguration.resourceTags.string");
var SnsTopicArn = jResp.StringOf("image.infrastructureConfiguration.snsTopicArn");
var SubnetId = jResp.StringOf("image.infrastructureConfiguration.subnetId");
TagsString = jResp.StringOf("image.infrastructureConfiguration.tags.string");
var TerminateInstanceOnFailure = jResp.IntOf("image.infrastructureConfiguration.terminateInstanceOnFailure");
var imageName = jResp.StringOf("image.name");
var OsVersion = jResp.StringOf("image.osVersion");
var imagePlatform = jResp.StringOf("image.platform");
var SourcePipelineArn = jResp.StringOf("image.sourcePipelineArn");
var SourcePipelineName = jResp.StringOf("image.sourcePipelineName");
var Reason = jResp.StringOf("image.state.reason");
var Status = jResp.StringOf("image.state.status");
TagsString = jResp.StringOf("image.tags.string");
var imageType = jResp.StringOf("image.type");
var imageVersion = jResp.StringOf("image.version");
var requestId = jResp.StringOf("requestId");
var i = 0;
var count_i = jResp.SizeOfArray("image.containerRecipe.components");
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");
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");
while (k < count_k) {
jResp.K = 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");
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;
}
i = 0;
count_i = jResp.SizeOfArray("image.distributionConfiguration.distributions");
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");
while (j < count_j) {
jResp.J = 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");
while (j < count_j) {
jResp.J = 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");
while (j < count_j) {
jResp.J = 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");
while (j < count_j) {
jResp.J = 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");
while (j < count_j) {
jResp.J = 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");
while (j < count_j) {
jResp.J = 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");
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;
}
j = 0;
count_j = jResp.SizeOfArray("image.distributionConfiguration.distributions[i].launchTemplateConfigurations");
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;
}
j = 0;
count_j = jResp.SizeOfArray("image.distributionConfiguration.distributions[i].licenseConfigurationArns");
while (j < count_j) {
jResp.J = 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");
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;
}
i = 0;
count_i = jResp.SizeOfArray("image.imageRecipe.components");
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");
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");
while (k < count_k) {
jResp.K = 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");
while (i < count_i) {
jResp.I = i;
strVal = jResp.StringOf("image.infrastructureConfiguration.instanceTypes[i]");
i = i+1;
}
i = 0;
count_i = jResp.SizeOfArray("image.infrastructureConfiguration.securityGroupIds");
while (i < count_i) {
jResp.I = i;
strVal = jResp.StringOf("image.infrastructureConfiguration.securityGroupIds[i]");
i = i+1;
}
i = 0;
count_i = jResp.SizeOfArray("image.outputResources.amis");
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;
}
i = 0;
count_i = jResp.SizeOfArray("image.outputResources.containers");
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");
while (j < count_j) {
jResp.J = 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"
// }
}
chilkatExample();