Skip to content

aws.ec2.describe_reserved_instances

Example SQL Queries

SELECT * FROM
aws.ec2.describe_reserved_instances;

Description

Describes one or more of the Reserved Instances that you purchased.

For more information about Reserved Instances, see Reserved Instances in the Amazon EC2 User Guide.

The order of the elements in the response, including those within nested structures, might vary. Applications should not assume the elements appear in a particular order.

Table Definition

Column NameColumn Data Type
dry_run Input Column

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

BOOLEAN
filters Input Column

One or more filters.

  • availability-zone - The Availability Zone where the Reserved Instance can be used.

  • duration - The duration of the Reserved Instance (one year or three years), in seconds (31536000 | 94608000).

  • end - The time when the Reserved Instance expires (for example, 2015-08-07T11:54:42.000Z).

  • fixed-price - The purchase price of the Reserved Instance (for example, 9800.0).

  • instance-type - The instance type that is covered by the reservation.

  • scope - The scope of the Reserved Instance (Region or Availability Zone).

  • product-description - The Reserved Instance product platform description (Linux/UNIX | Linux with SQL Server Standard | Linux with SQL Server Web | Linux with SQL Server Enterprise | SUSE Linux | Red Hat Enterprise Linux | Red Hat Enterprise Linux with HA | Windows | Windows with SQL Server Standard | Windows with SQL Server Web | Windows with SQL Server Enterprise).

  • reserved-instances-id - The ID of the Reserved Instance.

  • start - The time at which the Reserved Instance purchase request was placed (for example, 2014-08-07T11:54:42.000Z).

  • state - The state of the Reserved Instance (payment-pending | active | payment-failed | 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.

  • usage-price - The usage price of the Reserved Instance, per hour (for example, 0.84).

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

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

filters[].values[]
offering_class Input Column

Describes whether the Reserved Instance is Standard or Convertible.

VARCHAR
offering_type Input Column

The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the Medium Utilization Reserved Instance offering type.

VARCHAR
reserved_instances_ids Input Column

One or more Reserved Instance IDs.

Default: Describes all your Reserved Instances, or only those otherwise specified.

VARCHAR[]
Show child fields
reserved_instances_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
reserved_instances

A list of Reserved Instances.

STRUCT(
"availability_zone" VARCHAR,
"duration" BIGINT,
"end" TIMESTAMP_S,
"fixed_price" DOUBLE,
"instance_count" BIGINT,
"instance_type" VARCHAR,
"product_description" VARCHAR,
"reserved_instances_id" VARCHAR,
"start" TIMESTAMP_S,
"state" VARCHAR,
"usage_price" DOUBLE,
"currency_code" VARCHAR,
"instance_tenancy" VARCHAR,
"offering_class" VARCHAR,
"offering_type" VARCHAR,
"recurring_charges" STRUCT(
"amount" DOUBLE,
"frequency" VARCHAR
)[],
"scope" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
Show child fields
reserved_instances[]
Show child fields
reserved_instances[].availability_zone

The Availability Zone in which the Reserved Instance can be used.

reserved_instances[].currency_code

The currency of the Reserved Instance. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is USD.

reserved_instances[].duration

The duration of the Reserved Instance, in seconds.

reserved_instances[].end

The time when the Reserved Instance expires.

reserved_instances[].fixed_price

The purchase price of the Reserved Instance.

reserved_instances[].instance_count

The number of reservations purchased.

reserved_instances[].instance_tenancy

The tenancy of the instance.

reserved_instances[].instance_type

The instance type on which the Reserved Instance can be used.

reserved_instances[].offering_class

The offering class of the Reserved Instance.

reserved_instances[].offering_type

The Reserved Instance offering type.

reserved_instances[].product_description

The Reserved Instance product platform description.

reserved_instances[].recurring_charges[]
Show child fields
reserved_instances[].recurring_charges[].amount

The amount of the recurring charge.

reserved_instances[].recurring_charges[].frequency

The frequency of the recurring charge.

reserved_instances[].reserved_instances_id

The ID of the Reserved Instance.

reserved_instances[].scope

The scope of the Reserved Instance.

reserved_instances[].start

The date and time the Reserved Instance started.

reserved_instances[].state

The state of the Reserved Instance purchase.

reserved_instances[].tags[]
Show child fields
reserved_instances[].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:.

reserved_instances[].tags[].value

The value of the tag.

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

reserved_instances[].usage_price

The usage price of the Reserved Instance, per hour.