Skip to content

aws.ec2.describe_hosts

Example SQL Queries

SELECT * FROM
aws.ec2.describe_hosts;

Description

Describes the specified Dedicated Hosts or all your Dedicated Hosts.

The results describe only the Dedicated Hosts in the Region you're currently using. All listed instances consume capacity on your Dedicated Host. Dedicated Hosts that have recently been released are listed with the state released.

Table Definition

Column NameColumn Data Type
filter Input Column

The filters.

  • auto-placement - Whether auto-placement is enabled or disabled (on | off).

  • availability-zone - The Availability Zone of the host.

  • client-token - The idempotency token that you provided when you allocated the host.

  • host-reservation-id - The ID of the reservation assigned to this host.

  • instance-type - The instance type size that the Dedicated Host is configured to support.

  • state - The allocation state of the Dedicated Host (available | under-assessment | permanent-failure | released | released-permanent-failure).

  • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

STRUCT(
"name" VARCHAR,
"values" VARCHAR[]
)[]
Show child fields
filter[]
Show child fields
filter[].name

The name of the filter. Filter names are case-sensitive.

filter[].values[]
host_ids Input Column

The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches.

VARCHAR[]
Show child fields
host_ids[]
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
allocation_time

The time that the Dedicated Host was allocated.

TIMESTAMP_S
allows_multiple_instance_types

Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the value is on, the Dedicated Host supports multiple instance types in the instance family. If the value is off, the Dedicated Host supports a single instance type only.

VARCHAR
asset_id

The ID of the Outpost hardware asset on which the Dedicated Host is allocated.

VARCHAR
auto_placement

Whether auto-placement is on or off.

VARCHAR
availability_zone

The Availability Zone of the Dedicated Host.

VARCHAR
availability_zone_id

The ID of the Availability Zone in which the Dedicated Host is allocated.

VARCHAR
available_capacity

Information about the instances running on the Dedicated Host.

STRUCT(
"available_instance_capacity" STRUCT(
"available_capacity" BIGINT,
"instance_type" VARCHAR,
"total_capacity" BIGINT
)[],
"available_v_cpus" BIGINT
)
Show child fields
available_capacity.available_instance_capacity[]
Show child fields
available_capacity.available_instance_capacity[].available_capacity

The number of instances that can be launched onto the Dedicated Host based on the host's available capacity.

available_capacity.available_instance_capacity[].instance_type

The instance type supported by the Dedicated Host.

available_capacity.available_instance_capacity[].total_capacity

The total number of instances that can be launched onto the Dedicated Host if there are no instances running on it.

available_capacity.available_v_cpus

The number of vCPUs available for launching instances onto the Dedicated Host.

client_token

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

VARCHAR
host_id

The ID of the Dedicated Host.

VARCHAR
host_maintenance

Indicates whether host maintenance is enabled or disabled for the Dedicated Host.

VARCHAR
host_properties

The hardware specifications of the Dedicated Host.

STRUCT(
"cores" BIGINT,
"instance_type" VARCHAR,
"instance_family" VARCHAR,
"sockets" BIGINT,
"total_v_cpus" BIGINT
)
Show child fields
host_properties.cores

The number of cores on the Dedicated Host.

host_properties.instance_family

The instance family supported by the Dedicated Host. For example, m5.

host_properties.instance_type

The instance type supported by the Dedicated Host. For example, m5.large. If the host supports multiple instance types, no instanceType is returned.

host_properties.sockets

The number of sockets on the Dedicated Host.

host_properties.total_v_cpus

The total number of vCPUs on the Dedicated Host.

host_recovery

Indicates whether host recovery is enabled or disabled for the Dedicated Host.

VARCHAR
host_reservation_id

The reservation ID of the Dedicated Host. This returns a null response if the Dedicated Host doesn't have an associated reservation.

VARCHAR
instances

The IDs and instance type that are currently running on the Dedicated Host.

STRUCT(
"instance_id" VARCHAR,
"instance_type" VARCHAR,
"owner_id" VARCHAR
)[]
Show child fields
instances[]
Show child fields
instances[].instance_id

The ID of instance that is running on the Dedicated Host.

instances[].instance_type

The instance type (for example, m3.medium) of the running instance.

instances[].owner_id

The ID of the Amazon Web Services account that owns the instance.

member_of_service_linked_resource_group

Indicates whether the Dedicated Host is in a host resource group. If memberOfServiceLinkedResourceGroup is true, the host is in a host resource group; otherwise, it is not.

BOOLEAN
outpost_arn

The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.

VARCHAR
owner_id

The ID of the Amazon Web Services account that owns the Dedicated Host.

VARCHAR
release_time

The time that the Dedicated Host was released.

TIMESTAMP_S
state

The Dedicated Host's state.

VARCHAR
tags

Any tags assigned to the Dedicated Host.

STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
Show child fields
tags[]
Show child fields
tags[].key

The key of the tag.

Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:.

tags[].value

The value of the tag.

Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.