instances_list_only
Lists instances
in a region or regions, for all properties use instances
Overview
Name | instances_list_only |
Type | Resource |
Description | Resource Type definition for AWS::EC2::Instance |
Id | aws.ec2.instances_list_only |
Fields
Name | Datatype | Description |
---|---|---|
tenancy | string | The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. |
security_groups | array | the names of the security groups. For a nondefault VPC, you must use security group IDs instead. |
private_dns_name | string | The private DNS name of the specified instance. For example: ip-10-24-34-0.ec2.internal. |
private_ip_address | string | [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet. |
user_data | string | The user data to make available to the instance. |
block_device_mappings | array | The block device mapping entries that defines the block devices to attach to the instance at launch. |
iam_instance_profile | string | The IAM instance profile. |
ipv6_addresses | array | [EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface. |
kernel_id | string | The ID of the kernel. |
subnet_id | string | [EC2-VPC] The ID of the subnet to launch the instance into. |
ebs_optimized | boolean | Indicates whether the instance is optimized for Amazon EBS I/O. |
propagate_tags_to_volume_on_creation | boolean | Indicates whether to assign the tags from the instance to all of the volumes attached to the instance at launch. If you specify true and you assign tags to the instance, those tags are automatically assigned to all of the volumes that you attach to the instance at launch. If you specify false, those tags are not assigned to the attached volumes. |
elastic_gpu_specifications | array | An elastic GPU to associate with the instance. |
elastic_inference_accelerators | array | An elastic inference accelerator to associate with the instance. |
volumes | array | The volumes to attach to the instance. |
private_ip | string | The private IP address of the specified instance. For example: 10.24.34.0. |
ipv6_address_count | integer | [EC2-VPC] The number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. |
launch_template | object | The launch template to use to launch the instances. |
enclave_options | object | Indicates whether the instance is enabled for AWS Nitro Enclaves. |
network_interfaces | array | The network interfaces to associate with the instance. |
image_id | string | The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch template. |
instance_type | string | The instance type. |
monitoring | boolean | Specifies whether detailed monitoring is enabled for the instance. |
tags | array | The tags to add to the instance. |
additional_info | string | This property is reserved for internal use. If you use it, the stack fails with this error: Bad property set: [Testing this property] (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: 0XXXXXX-49c7-4b40-8bcc-76885dcXXXXX). |
hibernation_options | object | Indicates whether an instance is enabled for hibernation. |
license_specifications | array | The license configurations. |
instance_id | string | The EC2 Instance ID. |
public_ip | string | The public IP address of the specified instance. For example: 192.0.2.0. |
instance_initiated_shutdown_behavior | string | Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown). |
cpu_options | object | The CPU options for the instance. |
availability_zone | string | The Availability Zone of the instance. |
private_dns_name_options | object | The options for the instance hostname. |
host_id | string | If you specify host for the Affinity property, the ID of a dedicated host that the instance is associated with. If you don't specify an ID, Amazon EC2 launches the instance onto any available, compatible dedicated host in your account. |
host_resource_group_arn | string | The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host. |
public_dns_name | string | The public DNS name of the specified instance. For example: ec2-107-20-50-45.compute-1.amazonaws.com. |
security_group_ids | array | The IDs of the security groups. |
disable_api_termination | boolean | If you set this parameter to true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. |
key_name | string | The name of the key pair. |
ramdisk_id | string | The ID of the RAM disk to select. |
source_dest_check | boolean | Specifies whether to enable an instance launched in a VPC to perform NAT. |
placement_group_name | string | The name of an existing placement group that you want to launch the instance into (cluster | partition | spread). |
ssm_associations | array | The SSM document and parameter values in AWS Systems Manager to associate with this instance. |
vpc_id | string | The ID of the VPC that the instance is running in. |
state | object | The current state of the instance. |
affinity | string | Indicates whether the instance is associated with a dedicated host. If you want the instance to always restart on the same host on which it was launched, specify host. If you want the instance to restart on any available host, but try to launch onto the last host it ran on (on a best-effort basis), specify default. |
credit_specification | object | The credit option for CPU usage of the burstable performance instance. Valid values are standard and unlimited. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
list_resources | SELECT | region |
SELECT
examples
Lists all instances
in a region.
SELECT
region,
instance_id
FROM aws.ec2.instances_list_only
WHERE region = 'us-east-1';
Permissions
For permissions required to operate on the instances_list_only
resource, see instances