Skip to content

EC2  >  Structures  >  Instance

Instance

Structure Class

Instance dataclass

Bases: _SerdeShape

Describes an instance.

Attributes

ami_launch_index class-attribute instance-attribute
ami_launch_index: int | None = ...

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

architecture class-attribute instance-attribute
architecture: str | None = ...

The architecture of the image.

block_device_mappings class-attribute instance-attribute
block_device_mappings: list[InstanceBlockDeviceMapping] | None = ...

Any block device mapping entries for the instance.

boot_mode class-attribute instance-attribute
boot_mode: str | None = ...

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.

Note

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.

capacity_block_id class-attribute instance-attribute
capacity_block_id: str | None = ...

The ID of the Capacity Block.

Note

For P5 instances, a Capacity Block ID refers to a group of instances. For Trn2u instances, a capacity block ID refers to an EC2 UltraServer.

capacity_reservation_id class-attribute instance-attribute
capacity_reservation_id: str | None = ...

The ID of the Capacity Reservation.

capacity_reservation_specification class-attribute instance-attribute
capacity_reservation_specification: CapacityReservationSpecificationResponse | None = ...

Information about the Capacity Reservation targeting option.

client_token class-attribute instance-attribute
client_token: str | None = ...

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

cpu_options class-attribute instance-attribute
cpu_options: CpuOptions | None = ...

The CPU options for the instance.

current_instance_boot_mode class-attribute instance-attribute
current_instance_boot_mode: str | None = ...

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.

ebs_optimized class-attribute instance-attribute
ebs_optimized: bool | None = ...

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.

elastic_gpu_associations class-attribute instance-attribute
elastic_gpu_associations: list[ElasticGpuAssociation] | None = ...

Deprecated.

Note

Amazon Elastic Graphics reached end of life on January 8, 2024.

elastic_inference_accelerator_associations class-attribute instance-attribute
elastic_inference_accelerator_associations: list[ElasticInferenceAcceleratorAssociation] | None = ...

Deprecated

Note

Amazon Elastic Inference is no longer available.

ena_support class-attribute instance-attribute
ena_support: bool | None = ...

Specifies whether enhanced networking with ENA is enabled.

enclave_options class-attribute instance-attribute
enclave_options: EnclaveOptions | None = ...

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

hibernation_options class-attribute instance-attribute
hibernation_options: HibernationOptions | None = ...

Indicates whether the instance is enabled for hibernation.

hypervisor class-attribute instance-attribute
hypervisor: str | None = ...

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

iam_instance_profile class-attribute instance-attribute
iam_instance_profile: IamInstanceProfile | None = ...

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

image_id class-attribute instance-attribute
image_id: str | None = ...

The ID of the AMI used to launch the instance.

instance_id class-attribute instance-attribute
instance_id: str | None = ...

The ID of the instance.

instance_lifecycle class-attribute instance-attribute
instance_lifecycle: str | None = ...

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

instance_type class-attribute instance-attribute
instance_type: str | None = ...

The instance type.

ipv6_address class-attribute instance-attribute
ipv6_address: str | None = ...

The IPv6 address assigned to the instance.

kernel_id class-attribute instance-attribute
kernel_id: str | None = ...

The kernel associated with this instance, if applicable.

key_name class-attribute instance-attribute
key_name: str | None = ...

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

launch_time class-attribute instance-attribute
launch_time: datetime | None = ...

The time that the instance was last launched. To determine the time that instance was first launched, see the attachment time for the primary network interface.

licenses class-attribute instance-attribute
licenses: list[LicenseConfiguration] | None = ...

The license configurations for the instance.

maintenance_options class-attribute instance-attribute
maintenance_options: InstanceMaintenanceOptions | None = ...

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

metadata_options class-attribute instance-attribute
metadata_options: InstanceMetadataOptionsResponse | None = ...

The metadata options for the instance.

monitoring class-attribute instance-attribute
monitoring: Monitoring | None = ...

The monitoring for the instance.

network_interfaces class-attribute instance-attribute
network_interfaces: list[InstanceNetworkInterface] | None = ...

The network interfaces for the instance.

network_performance_options class-attribute instance-attribute
network_performance_options: InstanceNetworkPerformanceOptions | None = ...

Contains settings for the network performance options for your instance.

operator class-attribute instance-attribute
operator: OperatorResponse | None = ...

The service provider that manages the instance.

outpost_arn class-attribute instance-attribute
outpost_arn: str | None = ...

The Amazon Resource Name (ARN) of the Outpost.

placement class-attribute instance-attribute
placement: Placement | None = ...

The location where the instance launched, if applicable.

platform class-attribute instance-attribute
platform: str | None = ...

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

platform_details class-attribute instance-attribute
platform_details: str | None = ...

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

private_dns_name class-attribute instance-attribute
private_dns_name: str | None = ...

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

private_dns_name_options class-attribute instance-attribute
private_dns_name_options: PrivateDnsNameOptionsResponse | None = ...

The options for the instance hostname.

private_ip_address class-attribute instance-attribute
private_ip_address: str | None = ...

The private IPv4 address assigned to the instance.

product_codes class-attribute instance-attribute
product_codes: list[ProductCode] | None = ...

The product codes attached to this instance, if applicable.

public_dns_name class-attribute instance-attribute
public_dns_name: str | None = ...

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. The format of this name depends on the public hostname type.

public_ip_address class-attribute instance-attribute
public_ip_address: str | None = ...

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.

ramdisk_id class-attribute instance-attribute
ramdisk_id: str | None = ...

The RAM disk associated with this instance, if applicable.

root_device_name class-attribute instance-attribute
root_device_name: str | None = ...

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

root_device_type class-attribute instance-attribute
root_device_type: str | None = ...

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

secondary_interfaces class-attribute instance-attribute
secondary_interfaces: list[InstanceSecondaryInterface] | None = ...

The secondary interfaces for the instance.

security_groups class-attribute instance-attribute
security_groups: list[GroupIdentifier] | None = ...

The security groups for the instance.

source_dest_check class-attribute instance-attribute
source_dest_check: bool | None = ...

Indicates whether source/destination checking is enabled.

spot_instance_request_id class-attribute instance-attribute
spot_instance_request_id: str | None = ...

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

sriov_net_support class-attribute instance-attribute
sriov_net_support: str | None = ...

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

state class-attribute instance-attribute
state: InstanceState | None = ...

The current state of the instance.

state_reason class-attribute instance-attribute
state_reason: StateReason | None = ...

The reason for the most recent state transition.

state_transition_reason class-attribute instance-attribute
state_transition_reason: str | None = ...

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

subnet_id class-attribute instance-attribute
subnet_id: str | None = ...

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

tags class-attribute instance-attribute
tags: list[Tag] | None = ...

Any tags assigned to the instance.

tpm_support class-attribute instance-attribute
tpm_support: str | None = ...

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

usage_operation class-attribute instance-attribute
usage_operation: str | None = ...

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

usage_operation_update_time class-attribute instance-attribute
usage_operation_update_time: datetime | None = ...

The time that the usage operation was last updated.

virtualization_type class-attribute instance-attribute
virtualization_type: str | None = ...

The virtualization type of the instance.

vpc_id class-attribute instance-attribute
vpc_id: str | None = ...

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