Skip to main content

instances

List of ec2 instances by region (requires aws provider to be installed)

Overview

Nameinstances
TypeResource
DescriptionList of ec2 instances by region (requires `aws` provider to be installed)
Idawscc.ec2.instances

Fields

NameDatatypeDescription
instance_idstringThe ID of the instance.
instance_stateobjectDescribes the current state of an instance.
instance_typestringThe instance type.
vpc_idstring
subnet_idstring
ami_launch_indexintegerThe AMI launch index, which can be used to find this instance in the launch group.
architecturestringThe architecture of the image.
block_device_mappingarrayAny block device mapping entries for the instance.
boot_modestringThe boot mode of the instance.
capacity_reservation_idstringThe ID of the Capacity Reservation.
capacity_reservation_specificationobjectDescribes the instances Capacity Reservation targeting preferences
client_tokenstringThe idempotency token you provided when you launched the instance, if applicable.
cpu_optionsobjectThe CPU options for the instance.
dns_namestring(IPv4 only) The public DNS name assigned to the instance.
ebs_optimizedbooleanIndicates whether the instance is optimized for Amazon EBS I/O.
elastic_gpu_association_setarrayThe Elastic GPU associated with the instance.
elastic_inference_accelerator_association_setarrayThe elastic inference accelerator associated with the instance.
ena_supportbooleanSpecifies whether enhanced networking with ENA is enabled.
enclave_optionsobjectIndicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.
group_setarrayThe security groups for the instance.
hibernation_optionsobjectIndicates whether your instance is configured for hibernation.
hypervisorstringThe hypervisor type of the instance.
iam_instance_profileobjectDescribes an IAM instance profile.
image_idstringThe ID of the AMI used to launch the instance.
instance_lifecyclestringIndicates whether this is a Spot Instance or a Scheduled Instance.
ip_addressstringThe public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.
ipv6_addressstringThe IPv6 address assigned to the instance.
kernel_idstringThe kernel associated with this instance, if applicable.
key_namestringThe name of the key pair, if this instance was launched with an associated key pair.
launch_timestringThe time the instance was launched.
license_setarrayThe license configurations for the instance.
maintenance_optionsobjectThe maintenance options for the instance.
metadata_optionsobjectThe metadata options for the instance.
monitoringobjectDescribes the monitoring of an instance.
network_interface_setarray[EC2-VPC] The network interfaces for the instance.
outpost_arnstring
placementobjectDescribes the placement of an instance.
platformstringThe value is Windows instances; otherwise blank.
platform_detailsstringThe platform details value for the instance.
private_dns_namestring(IPv4 only) The private DNS hostname name assigned to the instance.
private_dns_name_optionsobjectDescribes the options for instance hostnames.
private_ip_addressstringThe private IPv4 address assigned to the instance.
product_codesarrayThe product codes attached to this instance, if applicable.
ramdisk_idstringThe RAM disk associated with this instance, if applicable.
reasonstringThe reason for the most recent state transition. This might be an empty string.
root_device_namestringThe device name of the root device volume.
root_device_typestringThe root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
source_dest_checkbooleanIndicates whether source/destination checking is enabled.
spot_instance_request_idstringIf the request is a Spot Instance request, the ID of the request.
sriov_net_supportstringSpecifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.
state_reasonobjectDescribes a state change.
tag_setarray
tpm_supportstringIf the instance is configured for NitroTPM support
usage_operationstringThe usage operation value for the instance.
usage_operation_update_timestringThe time that the usage operation was last updated.
virtualization_typestringThe virtualization type of the instance.
regionstring
regionstringAWS region.

Methods

Currently only SELECT is supported for this resource resource.

Example

SELECT
region,
instance_id,
instance_state,
instance_type,
vpc_id,
subnet_id,
ami_launch_index,
architecture,
block_device_mapping,
boot_mode,
capacity_reservation_id,
capacity_reservation_specification,
client_token,
cpu_options,
dns_name,
ebs_optimized,
elastic_gpu_association_set,
elastic_inference_accelerator_association_set,
ena_support,
enclave_options,
group_set,
hibernation_options,
hypervisor,
iam_instance_profile,
image_id,
instance_lifecycle,
ip_address,
ipv6_address,
kernel_id,
key_name,
launch_time,
license_set,
maintenance_options,
metadata_options,
monitoring,
network_interface_set,
outpost_arn,
placement,
platform,
platform_details,
private_dns_name,
private_dns_name_options,
private_ip_address,
product_codes,
ramdisk_id,
reason,
root_device_name,
root_device_type,
source_dest_check,
spot_instance_request_id,
sriov_net_support,
state_reason,
tag_set,
tpm_support,
usage_operation,
usage_operation_update_time,
virtualization_type,
region
FROM awscc.ec2.instances
WHERE region = '<region>';