The describe_images function is the base AWS::EC2 gem call we are using for this handler and returns a multi-level hash/array nest with a top level hash key of "imagesSet".
The imagesSet has the following pseudo-xml form. Elements with the
All others are hash members and are references by element/key name.
To retrieve the imageId, for example, simply flatten the above structure by removing inapplicable items
Treat items as arrays and all other members as hash keys. Doing so, we can reference imageId value in the following manner:
@baseawsobject.imagesSet.item[index].imageId
In this handler, we are returning just the more interesting properties for an instance. Future versions may incorporate additional properties.
Name | Description | Sample |
---|---|---|
access_key | AWS Access Key. | |
secret_key | AWS Secret Key. | ********* |
region | AWS Region that the EC2 object is located in. | |
enable_debug_logging | Enable debug logging if the value is set to 'Yes'. | No |
Name | Description | Sample |
---|---|---|
Image ID | The image id of the EC2 image that this handler will retrieve details about | <%= @answers['Image ID'] %> |
Name | Description |
---|---|
Image Location | The location of the AMI. |
Image State | Current state of the AMI. If the operation returns available, the image is successfully registered and available for launching. |
Owner Id | AWS account ID of the image owner. |
isPublic | |
Architecture | The architecture of the image. |
Image Type | The type of image (machine, kernel, or RAM disk). |
Kernel Id | The kernel associated with the image, if any. Only applicable for machine images. |
Image Owner Alias | The AWS account alias (e.g., amazon, self, etc.) or AWS account ID that owns the AMI. |
Name | The name of the AMI that was provided during image creation. |
Description | The description of the AMI that was provided during image creation. |
Virtualization Type | The type of virtualization of the AMI. |
Tag Set | Tags assigned to the resource. Each tag's information is wrapped in an item element. |
Is Public |
AWS EC2 Image Retrieve V1.1 (2017-08-24)
- Update the EC2 gem to AWS SDK 2.2.34.
- Change Info Values to be more consistent with the other AWS handlers.
- Internal tweaks to make execution similar to other AWS handlers.
AWS EC2 Image Retrieve V1 (2011-03-03)
- Initial version. See README for details.