You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::EC2::Image
- Inherits:
-
Resources::Resource
- Object
- Resources::Resource
- Aws::EC2::Image
- Defined in:
- (unknown)
Instance Attribute Summary collapse
-
#architecture ⇒ String
readonly
The architecture of the image.
-
#block_device_mappings ⇒ Array<Types::BlockDeviceMapping>
readonly
Any block device mapping entries.
-
#creation_date ⇒ String
readonly
The date and time the image was created.
-
#description ⇒ String
readonly
The description of the AMI that was provided during image creation.
-
#ena_support ⇒ Boolean
readonly
Specifies whether enhanced networking with ENA is enabled.
-
#hypervisor ⇒ String
readonly
The hypervisor type of the image.
-
#id ⇒ String
readonly
-
#image_id ⇒ String
readonly
The ID of the AMI.
-
#image_location ⇒ String
readonly
The location of the AMI.
-
#image_owner_alias ⇒ String
readonly
The AWS account alias (for example,
amazon
,self
) or the AWS account ID of the AMI owner. -
#image_type ⇒ String
readonly
The type of image.
-
#kernel_id ⇒ String
readonly
The kernel associated with the image, if any.
-
#name ⇒ String
readonly
The name of the AMI that was provided during image creation.
-
#owner_id ⇒ String
readonly
The AWS account ID of the image owner.
-
#platform ⇒ String
readonly
This value is set to
windows
for Windows AMIs; otherwise, it is blank. -
#platform_details ⇒ String
readonly
The platform details associated with the billing code of the AMI.
-
#product_codes ⇒ Array<Types::ProductCode>
readonly
Any product codes associated with the AMI.
-
#public ⇒ Boolean
readonly
Indicates whether the image has public launch permissions.
-
#ramdisk_id ⇒ String
readonly
The RAM disk associated with the image, if any.
-
#root_device_name ⇒ String
readonly
The device name of the root device volume (for example,
/dev/sda1
). -
#root_device_type ⇒ String
readonly
The type of root device used by the AMI.
-
#sriov_net_support ⇒ String
readonly
Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.
-
#state ⇒ String
readonly
The current state of the AMI.
-
#state_reason ⇒ Types::StateReason
readonly
The reason for the state change.
-
#tags ⇒ Array<Types::Tag>
readonly
Any tags assigned to the image.
-
#usage_operation ⇒ String
readonly
The operation of the Amazon EC2 instance and the billing code that is associated with the AMI.
-
#virtualization_type ⇒ String
readonly
The type of virtualization of the AMI.
Attributes inherited from Resources::Resource
Instance Method Summary collapse
-
#create_tags(options = {}) ⇒ Array<Tag>
-
#delete_tags(options = {}) ⇒ Array<Tag>
-
#deregister(options = {}) ⇒ Struct
Deregisters the specified AMI.
-
#describe_attribute(options = {}) ⇒ Types::ImageAttribute
Describes the specified attribute of the specified AMI.
-
#exists? ⇒ Boolean
Returns
true
if this Image exists. -
#initialize ⇒ Object
constructor
-
#modify_attribute(options = {}) ⇒ Struct
Modifies the specified attribute of the specified AMI.
-
#reset_attribute(options = {}) ⇒ Struct
Resets an attribute of an AMI to its default value.
The productCodes attribute can't be reset.
-
#wait_until_exists {|waiter| ... } ⇒ Image
Waits until this Image is exists.
Methods inherited from Resources::Resource
add_data_attribute, add_identifier, #data, data_attributes, #data_loaded?, identifiers, #load, #wait_until
Methods included from Resources::OperationMethods
#add_batch_operation, #add_operation, #batch_operation, #batch_operation_names, #batch_operations, #operation, #operation_names, #operations
Constructor Details
#initialize(id, options = {}) ⇒ Object #initialize(options = {}) ⇒ Object
Instance Attribute Details
#architecture ⇒ String (readonly)
The architecture of the image.
Possible values:
- i386
- x86_64
- arm64
#block_device_mappings ⇒ Array<Types::BlockDeviceMapping> (readonly)
Any block device mapping entries.
#creation_date ⇒ String (readonly)
The date and time the image was created.
#description ⇒ String (readonly)
The description of the AMI that was provided during image creation.
#ena_support ⇒ Boolean (readonly)
Specifies whether enhanced networking with ENA is enabled.
#hypervisor ⇒ String (readonly)
The hypervisor type of the image.
Possible values:
- ovm
- xen
#id ⇒ String (readonly)
#image_id ⇒ String (readonly)
The ID of the AMI.
#image_location ⇒ String (readonly)
The location of the AMI.
#image_owner_alias ⇒ String (readonly)
The AWS account alias (for example, amazon
, self
) or the AWS account
ID of the AMI owner.
#image_type ⇒ String (readonly)
The type of image.
Possible values:
- machine
- kernel
- ramdisk
#kernel_id ⇒ String (readonly)
The kernel associated with the image, if any. Only applicable for machine images.
#name ⇒ String (readonly)
The name of the AMI that was provided during image creation.
#owner_id ⇒ String (readonly)
The AWS account ID of the image owner.
#platform ⇒ String (readonly)
This value is set to windows
for Windows AMIs; otherwise, it is blank.
Possible values:
- Windows
#platform_details ⇒ String (readonly)
The platform details associated with the billing code of the AMI. For more information, see Obtaining Billing Information in the Amazon Elastic Compute Cloud User Guide.
#product_codes ⇒ Array<Types::ProductCode> (readonly)
Any product codes associated with the AMI.
#public ⇒ Boolean (readonly)
Indicates whether the image has public launch permissions. The value is
true
if this image has public launch permissions or false
if it has
only implicit and explicit launch permissions.
#ramdisk_id ⇒ String (readonly)
The RAM disk associated with the image, if any. Only applicable for machine images.
#root_device_name ⇒ String (readonly)
The device name of the root device volume (for example, /dev/sda1
).
#root_device_type ⇒ String (readonly)
The type of root device used by the AMI. The AMI can use an EBS volume or an instance store volume.
Possible values:
- ebs
- instance-store
#sriov_net_support ⇒ String (readonly)
Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.
#state ⇒ String (readonly)
The current state of the AMI. If the state is available
, the image is
successfully registered and can be used to launch an instance.
Possible values:
- pending
- available
- invalid
- deregistered
- transient
- failed
- error
#state_reason ⇒ Types::StateReason (readonly)
The reason for the state change.
#tags ⇒ Array<Types::Tag> (readonly)
Any tags assigned to the image.
#usage_operation ⇒ String (readonly)
The operation of the Amazon EC2 instance and the billing code that is
associated with the AMI. usageOperation
corresponds to the
lineitem/Operation column on your AWS Cost and Usage Report and in
the AWS Price List API. For the list of UsageOperation
codes, see
Platform Details and Usage Operation Billing Codes in the Amazon
Elastic Compute Cloud User Guide.
#virtualization_type ⇒ String (readonly)
The type of virtualization of the AMI.
Possible values:
- hvm
- paravirtual
Instance Method Details
#create_tags(options = {}) ⇒ Array<Tag>
#delete_tags(options = {}) ⇒ Array<Tag>
#deregister(options = {}) ⇒ Struct
Deregisters the specified AMI. After you deregister an AMI, it can't be used to launch new instances; however, it doesn't affect any instances that you've already launched from the AMI. You'll continue to incur usage costs for those instances until you terminate them.
When you deregister an Amazon EBS-backed AMI, it doesn't affect the snapshot that was created for the root volume of the instance during the AMI creation process. When you deregister an instance store-backed AMI, it doesn't affect the files that you uploaded to Amazon S3 when you created the AMI.
#describe_attribute(options = {}) ⇒ Types::ImageAttribute
Describes the specified attribute of the specified AMI. You can specify only one attribute at a time.
#exists? ⇒ Boolean
Returns true
if this Image exists. Returns false
otherwise.
#modify_attribute(options = {}) ⇒ Struct
Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time. You can use the Attribute
parameter to specify the attribute or one of the following parameters: Description
, LaunchPermission
, or ProductCode
.
AWS Marketplace product codes cannot be modified. Images with an AWS Marketplace product code cannot be made public.
To enable the SriovNetSupport enhanced networking attribute of an image, enable SriovNetSupport on an instance and create an AMI from the instance.
#reset_attribute(options = {}) ⇒ Struct
Resets an attribute of an AMI to its default value.
The productCodes attribute can't be reset.
#wait_until_exists {|waiter| ... } ⇒ Image
Waits until this Image is exists. This method waits by polling Client#describe_images until successful. An error is raised after a configurable number of failed checks.
This waiter uses the following defaults:
Configuration | Default |
---|---|
#delay |
15 |
#max_attempts |
40 |
You can modify defaults and register callbacks by passing a block argument.