AWS SDK Version 3 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 instance.

Inheritance Hierarchy

System.Object
  Amazon.EC2.Model.Instance

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

Syntax

C#
public class Instance

The Instance type exposes the following members

Constructors

NameDescription
Public Method Instance()

Properties

NameTypeDescription
Public Property AmiLaunchIndex System.Int32

Gets and sets the property AmiLaunchIndex.

The AMI launch index, which can be used to find this instance in the launch group.

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.InstanceBlockDeviceMapping>

Gets and sets the property BlockDeviceMappings.

Any block device mapping entries for the instance.

Public Property BootMode Amazon.EC2.BootModeValues

Gets and sets the property BootMode.

The boot mode that was specified by the AMI. If the value is uefi-preferred, the AMI supports both UEFI and Legacy BIOS. The currentInstanceBootMode parameter is the boot mode that is used to boot the instance at launch or start.

The operating system contained in the AMI must be configured to support the specified boot mode.

For more information, see Boot modes in the Amazon EC2 User Guide.

Public Property CapacityReservationId System.String

Gets and sets the property CapacityReservationId.

The ID of the Capacity Reservation.

Public Property CapacityReservationSpecification Amazon.EC2.Model.CapacityReservationSpecificationResponse

Gets and sets the property CapacityReservationSpecification.

Information about the Capacity Reservation targeting option.

Public Property ClientToken System.String

Gets and sets the property ClientToken.

The idempotency token you provided when you launched the instance, if applicable.

Public Property CpuOptions Amazon.EC2.Model.CpuOptions

Gets and sets the property CpuOptions.

The CPU options for the instance.

Public Property CurrentInstanceBootMode Amazon.EC2.InstanceBootModeValues

Gets and sets the property CurrentInstanceBootMode.

The boot mode that is used to boot the instance at launch or start. For more information, see Boot modes in the Amazon EC2 User Guide.

Public Property EbsOptimized System.Boolean

Gets and sets the property EbsOptimized.

Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

Public Property ElasticGpuAssociations System.Collections.Generic.List<Amazon.EC2.Model.ElasticGpuAssociation>

Gets and sets the property ElasticGpuAssociations.

Deprecated.

Amazon Elastic Graphics reached end of life on January 8, 2024. For workloads that require graphics acceleration, we recommend that you use Amazon EC2 G4ad, G4dn, or G5 instances.

Public Property ElasticInferenceAcceleratorAssociations System.Collections.Generic.List<Amazon.EC2.Model.ElasticInferenceAcceleratorAssociation>

Gets and sets the property ElasticInferenceAcceleratorAssociations.

The elastic inference accelerator associated with the instance.

Public Property EnaSupport System.Boolean

Gets and sets the property EnaSupport.

Specifies whether enhanced networking with ENA is enabled.

Public Property EnclaveOptions Amazon.EC2.Model.EnclaveOptions

Gets and sets the property EnclaveOptions.

Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

Public Property HibernationOptions Amazon.EC2.Model.HibernationOptions

Gets and sets the property HibernationOptions.

Indicates whether the instance is enabled for hibernation.

Public Property Hypervisor Amazon.EC2.HypervisorType

Gets and sets the property Hypervisor.

The hypervisor type of the instance. The value xen is used for both Xen and Nitro hypervisors.

Public Property IamInstanceProfile Amazon.EC2.Model.IamInstanceProfile

Gets and sets the property IamInstanceProfile.

The IAM instance profile associated with the instance, if applicable.

Public Property ImageId System.String

Gets and sets the property ImageId.

The ID of the AMI used to launch the instance.

Public Property InstanceId System.String

Gets and sets the property InstanceId.

The ID of the instance.

Public Property InstanceLifecycle Amazon.EC2.InstanceLifecycleType

Gets and sets the property InstanceLifecycle.

Indicates whether this is a Spot Instance or a Scheduled Instance.

Public Property InstanceType Amazon.EC2.InstanceType

Gets and sets the property InstanceType.

The instance type.

Public Property Ipv6Address System.String

Gets and sets the property Ipv6Address.

The IPv6 address assigned to the instance.

Public Property KernelId System.String

Gets and sets the property KernelId.

The kernel associated with this instance, if applicable.

Public Property KeyName System.String

Gets and sets the property KeyName.

The name of the key pair, if this instance was launched with an associated key pair.

Public Property LaunchTime System.DateTime

Gets and sets the property LaunchTime.

The time the instance was launched.

Public Property Licenses System.Collections.Generic.List<Amazon.EC2.Model.LicenseConfiguration>

Gets and sets the property Licenses.

The license configurations for the instance.

Public Property MaintenanceOptions Amazon.EC2.Model.InstanceMaintenanceOptions

Gets and sets the property MaintenanceOptions.

Provides information on the recovery and maintenance options of your instance.

Public Property MetadataOptions Amazon.EC2.Model.InstanceMetadataOptionsResponse

Gets and sets the property MetadataOptions.

The metadata options for the instance.

Public Property Monitoring Amazon.EC2.Model.Monitoring

Gets and sets the property Monitoring.

The monitoring for the instance.

Public Property NetworkInterfaces System.Collections.Generic.List<Amazon.EC2.Model.InstanceNetworkInterface>

Gets and sets the property NetworkInterfaces.

The network interfaces for the instance.

Public Property OutpostArn System.String

Gets and sets the property OutpostArn.

The Amazon Resource Name (ARN) of the Outpost.

Public Property Placement Amazon.EC2.Model.Placement

Gets and sets the property Placement.

The location where the instance launched, if applicable.

Public Property Platform Amazon.EC2.PlatformValues

Gets and sets the property Platform.

The platform. This value is windows for Windows instances; otherwise, it is empty.

Public Property PlatformDetails System.String

Gets and sets the property PlatformDetails.

The platform details value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.

Public Property PrivateDnsName System.String

Gets and sets the property PrivateDnsName.

[IPv4 only] The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.

The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.

Public Property PrivateDnsNameOptions Amazon.EC2.Model.PrivateDnsNameOptionsResponse

Gets and sets the property PrivateDnsNameOptions.

The options for the instance hostname.

Public Property PrivateIpAddress System.String

Gets and sets the property PrivateIpAddress.

The private IPv4 address assigned to the instance.

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

Gets and sets the property ProductCodes.

The product codes attached to this instance, if applicable.

Public Property PublicDnsName System.String

Gets and sets the property PublicDnsName.

[IPv4 only] The public DNS name assigned to the instance. This name is not available until the instance enters the running state. This name is only available if you've enabled DNS hostnames for your VPC.

Public Property PublicIpAddress System.String

Gets and sets the property PublicIpAddress.

The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.

A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.

Public Property RamdiskId System.String

Gets and sets the property RamdiskId.

The RAM disk associated with this instance, if applicable.

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 root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.

Public Property SecurityGroups System.Collections.Generic.List<Amazon.EC2.Model.GroupIdentifier>

Gets and sets the property SecurityGroups.

The security groups for the instance.

Public Property SourceDestCheck System.Boolean

Gets and sets the property SourceDestCheck.

Indicates whether source/destination checking is enabled.

Public Property SpotInstanceRequestId System.String

Gets and sets the property SpotInstanceRequestId.

If the request is a Spot Instance request, the ID of the request.

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.Model.InstanceState

Gets and sets the property State.

The current state of the instance.

Public Property StateReason Amazon.EC2.Model.StateReason

Gets and sets the property StateReason.

The reason for the most recent state transition.

Public Property StateTransitionReason System.String

Gets and sets the property StateTransitionReason.

The reason for the most recent state transition. This might be an empty string.

Public Property SubnetId System.String

Gets and sets the property SubnetId.

The ID of the subnet in which the instance is running.

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

Gets and sets the property Tags.

Any tags assigned to the instance.

Public Property TpmSupport System.String

Gets and sets the property TpmSupport.

If the instance 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 usage operation value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide.

Public Property UsageOperationUpdateTime System.DateTime

Gets and sets the property UsageOperationUpdateTime.

The time that the usage operation was last updated.

Public Property VirtualizationType Amazon.EC2.VirtualizationType

Gets and sets the property VirtualizationType.

The virtualization type of the instance.

Public Property VpcId System.String

Gets and sets the property VpcId.

The ID of the VPC in which the instance is running.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5