Skip to content

aws.ec2.describe_host_reservations

Example SQL Queries

SELECT * FROM
aws.ec2.describe_host_reservations;

Description

Describes reservations that are associated with Dedicated Hosts in your account.

Table Definition

Column NameColumn Data Type
filter Input Column

The filters.

  • instance-family - The instance family (for example, m4).

  • payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront).

  • state - The state of the reservation (payment-pending | payment-failed | active | retired).

  • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

  • 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_reservation_id_set Input Column

The host reservation IDs.

VARCHAR[]
Show child fields
host_reservation_id_set[]
_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
count

The number of Dedicated Hosts the reservation is associated with.

BIGINT
currency_code

The currency in which the upfrontPrice and hourlyPrice amounts are specified. At this time, the only supported currency is USD.

VARCHAR
duration

The length of the reservation's term, specified in seconds. Can be 31536000 (1 year) | 94608000 (3 years).

BIGINT
end

The date and time that the reservation ends.

TIMESTAMP_S
host_id_set

The IDs of the Dedicated Hosts associated with the reservation.

VARCHAR[]
Show child fields
host_id_set[]
host_reservation_id

The ID of the reservation that specifies the associated Dedicated Hosts.

VARCHAR
hourly_price

The hourly price of the reservation.

VARCHAR
instance_family

The instance family of the Dedicated Host Reservation. The instance family on the Dedicated Host must be the same in order for it to benefit from the reservation.

VARCHAR
offering_id

The ID of the reservation. This remains the same regardless of which Dedicated Hosts are associated with it.

VARCHAR
payment_option

The payment option selected for this reservation.

VARCHAR
start

The date and time that the reservation started.

TIMESTAMP_S
state

The state of the reservation.

VARCHAR
tags

Any tags assigned to the Dedicated Host Reservation.

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.

upfront_price

The upfront price of the reservation.

VARCHAR