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 ClientToken System.String

Gets and sets the property ClientToken.

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

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.

The Elastic GPU 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 Hypervisor Amazon.EC2.HypervisorType

Gets and sets the property Hypervisor.

The hypervisor type of the instance.

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

[EC2-VPC] One or more network interfaces for the instance.

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 value is Windows for Windows instances; otherwise blank.

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.

[EC2-VPC] 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 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. For EC2-VPC, 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 assigned to the instance, if applicable.

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 root device name (for example, /dev/sda1 or /dev/xvda).

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.

One or more security groups for the instance.

Public Property SourceDestCheck System.Boolean

Gets and sets the property SourceDestCheck.

Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.

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.

[EC2-VPC] 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 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.

[EC2-VPC] The ID of the VPC in which the instance is running.

Version Information

.NET Standard:
Supported in: 1.3

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

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms