AWS SDK Version 4 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Describes an image.

Inheritance Hierarchy

System.Object
  Amazon.EC2.Model.Image

Namespace: Amazon.EC2.Model
Assembly: AWSSDK.EC2.dll
Version: 3.x.y.z

Syntax

C#
public class Image

The Image type exposes the following members

Constructors

NameDescription
Public Method Image()

Properties

NameTypeDescription
Public Property Architecture Amazon.EC2.ArchitectureValues

Gets and sets the property Architecture.

The architecture of the image.

Public Property BlockDeviceMappings System.Collections.Generic.List<Amazon.EC2.Model.BlockDeviceMapping>

Gets and sets the property BlockDeviceMappings.

Any block device mapping entries.

Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.

Public Property BootMode Amazon.EC2.BootModeValues

Gets and sets the property BootMode.

The boot mode of the image. For more information, see Instance launch behavior with Amazon EC2 boot modes in the Amazon EC2 User Guide.

Public Property CreationDate System.String

Gets and sets the property CreationDate.

The date and time the image was created.

Public Property DeprecationTime System.String

Gets and sets the property DeprecationTime.

The date and time to deprecate the AMI, in UTC, in the following format: YYYY-MM-DDTHH:MM:SSZ. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.

Public Property DeregistrationProtection System.String

Gets and sets the property DeregistrationProtection.

Indicates whether deregistration protection is enabled for the AMI.

Public Property Description System.String

Gets and sets the property Description.

The description of the AMI that was provided during image creation.

Public Property EnaSupport System.Nullable<System.Boolean>

Gets and sets the property EnaSupport.

Specifies whether enhanced networking with ENA is enabled.

Public Property FreeTierEligible System.Nullable<System.Boolean>

Gets and sets the property FreeTierEligible.

Indicates whether the image is eligible for Amazon Web Services Free Tier.

  • If true, the AMI is eligible for Free Tier and can be used to launch instances under the Free Tier limits.

  • If false, the AMI is not eligible for Free Tier.

Public Property Hypervisor Amazon.EC2.HypervisorType

Gets and sets the property Hypervisor.

The hypervisor type of the image. Only xen is supported. ovm is not supported.

Public Property ImageAllowed System.Nullable<System.Boolean>

Gets and sets the property ImageAllowed.

If true, the AMI satisfies the criteria for Allowed AMIs and can be discovered and used in the account. If false and Allowed AMIs is set to enabled, the AMI can't be discovered or used in the account. If false and Allowed AMIs is set to audit-mode, the AMI can be discovered and used in the account.

For more information, see Control the discovery and use of AMIs in Amazon EC2 with Allowed AMIs in Amazon EC2 User Guide.

Public Property ImageId System.String

Gets and sets the property ImageId.

The ID of the AMI.

Public Property ImageLocation System.String

Gets and sets the property ImageLocation.

The location of the AMI.

Public Property ImageOwnerAlias System.String

Gets and sets the property ImageOwnerAlias.

The owner alias (amazon | aws-backup-vault | aws-marketplace).

Public Property ImageType Amazon.EC2.ImageTypeValues

Gets and sets the property ImageType.

The type of image.

Public Property ImdsSupport Amazon.EC2.ImdsSupportValues

Gets and sets the property ImdsSupport.

If v2.0, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will have HttpTokens automatically set to required so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, HttpPutResponseHopLimit is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide.

Public Property KernelId System.String

Gets and sets the property KernelId.

The kernel associated with the image, if any. Only applicable for machine images.

Public Property LastLaunchedTime System.String

Gets and sets the property LastLaunchedTime.

The date and time, in ISO 8601 date-time format, when the AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before that usage is reported.

lastLaunchedTime data is available starting April 2017.

Public Property Name System.String

Gets and sets the property Name.

The name of the AMI that was provided during image creation.

Public Property OwnerId System.String

Gets and sets the property OwnerId.

The ID of the Amazon Web Services account that owns the image.

Public Property Platform Amazon.EC2.PlatformValues

Gets and sets the property Platform.

This value is set to windows for Windows AMIs; otherwise, it is blank.

Public Property PlatformDetails System.String

Gets and sets the property PlatformDetails.

The platform details associated with the billing code of the AMI. For more information, see Understand AMI billing information in the Amazon EC2 User Guide.

Public Property ProductCodes System.Collections.Generic.List<Amazon.EC2.Model.ProductCode>

Gets and sets the property ProductCodes.

Any product codes associated with the AMI.

Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.

Public Property Public System.Nullable<System.Boolean>

Gets and sets the property Public.

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.

Public Property RamdiskId System.String

Gets and sets the property RamdiskId.

The RAM disk associated with the image, if any. Only applicable for machine images.

Public Property RootDeviceName System.String

Gets and sets the property RootDeviceName.

The device name of the root device volume (for example, /dev/sda1).

Public Property RootDeviceType Amazon.EC2.DeviceType

Gets and sets the property RootDeviceType.

The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.

Public Property SourceImageId System.String

Gets and sets the property SourceImageId.

The ID of the source AMI from which the AMI was created.

Public Property SourceImageRegion System.String

Gets and sets the property SourceImageRegion.

The Region of the source AMI.

Public Property SourceInstanceId System.String

Gets and sets the property SourceInstanceId.

The ID of the instance that the AMI was created from if the AMI was created using CreateImage. This field only appears if the AMI was created using CreateImage.

Public Property SriovNetSupport System.String

Gets and sets the property SriovNetSupport.

Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

Public Property State Amazon.EC2.ImageState

Gets and sets the property State.

The current state of the AMI. If the state is available, the image is successfully registered and can be used to launch an instance.

Public Property StateReason Amazon.EC2.Model.StateReason

Gets and sets the property StateReason.

The reason for the state change.

Public Property Tags System.Collections.Generic.List<Amazon.EC2.Model.Tag>

Gets and sets the property Tags.

Any tags assigned to the image.

Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.

Public Property TpmSupport Amazon.EC2.TpmSupportValues

Gets and sets the property TpmSupport.

If the image is configured for NitroTPM support, the value is v2.0. For more information, see NitroTPM in the Amazon EC2 User Guide.

Public Property UsageOperation System.String

Gets and sets the property UsageOperation.

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 Amazon Web Services Cost and Usage Report and in the Amazon Web Services Price List API. You can view these fields on the Instances or AMIs pages in the Amazon EC2 console, or in the responses that are returned by the DescribeImages command in the Amazon EC2 API, or the describe-images command in the CLI.

Public Property VirtualizationType Amazon.EC2.VirtualizationType

Gets and sets the property VirtualizationType.

The type of virtualization of the AMI.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.7.2 and newer