instances
List of ec2 instances by region (requires aws
provider to be installed)
Overview
Name | instances |
Type | Resource |
Description | List of ec2 instances by region (requires `aws` provider to be installed) |
Id | awscc.ec2.instances |
Fields
Name | Datatype | Description |
---|---|---|
instance_id | string | The ID of the instance. |
instance_state | object | Describes the current state of an instance. |
instance_type | string | The instance type. |
vpc_id | string | |
subnet_id | string | |
ami_launch_index | integer | The AMI launch index, which can be used to find this instance in the launch group. |
architecture | string | The architecture of the image. |
block_device_mapping | array | Any block device mapping entries for the instance. |
boot_mode | string | The boot mode of the instance. |
capacity_reservation_id | string | The ID of the Capacity Reservation. |
capacity_reservation_specification | object | Describes the instances Capacity Reservation targeting preferences |
client_token | string | The idempotency token you provided when you launched the instance, if applicable. |
cpu_options | object | The CPU options for the instance. |
dns_name | string | (IPv4 only) The public DNS name assigned to the instance. |
ebs_optimized | boolean | Indicates whether the instance is optimized for Amazon EBS I/O. |
elastic_gpu_association_set | array | The Elastic GPU associated with the instance. |
elastic_inference_accelerator_association_set | array | The elastic inference accelerator associated with the instance. |
ena_support | boolean | Specifies whether enhanced networking with ENA is enabled. |
enclave_options | object | Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. |
group_set | array | The security groups for the instance. |
hibernation_options | object | Indicates whether your instance is configured for hibernation. |
hypervisor | string | The hypervisor type of the instance. |
iam_instance_profile | object | Describes an IAM instance profile. |
image_id | string | The ID of the AMI used to launch the instance. |
instance_lifecycle | string | Indicates whether this is a Spot Instance or a Scheduled Instance. |
ip_address | string | The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable. |
ipv6_address | string | The IPv6 address assigned to the instance. |
kernel_id | string | The kernel associated with this instance, if applicable. |
key_name | string | The name of the key pair, if this instance was launched with an associated key pair. |
launch_time | string | The time the instance was launched. |
license_set | array | The license configurations for the instance. |
maintenance_options | object | The maintenance options for the instance. |
metadata_options | object | The metadata options for the instance. |
monitoring | object | Describes the monitoring of an instance. |
network_interface_set | array | [EC2-VPC] The network interfaces for the instance. |
outpost_arn | string | |
placement | object | Describes the placement of an instance. |
platform | string | The value is Windows instances; otherwise blank. |
platform_details | string | The platform details value for the instance. |
private_dns_name | string | (IPv4 only) The private DNS hostname name assigned to the instance. |
private_dns_name_options | object | Describes the options for instance hostnames. |
private_ip_address | string | The private IPv4 address assigned to the instance. |
product_codes | array | The product codes attached to this instance, if applicable. |
ramdisk_id | string | The RAM disk associated with this instance, if applicable. |
reason | string | The reason for the most recent state transition. This might be an empty string. |
root_device_name | string | The device name of the root device volume. |
root_device_type | string | The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume. |
source_dest_check | boolean | Indicates whether source/destination checking is enabled. |
spot_instance_request_id | string | If the request is a Spot Instance request, the ID of the request. |
sriov_net_support | string | Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled. |
state_reason | object | Describes a state change. |
tag_set | array | |
tpm_support | string | If the instance is configured for NitroTPM support |
usage_operation | string | The usage operation value for the instance. |
usage_operation_update_time | string | The time that the usage operation was last updated. |
virtualization_type | string | The virtualization type of the instance. |
region | string | |
region | string | AWS 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>';