Skip to content

aws.ec2.describe_reserved_instances_listings

Example SQL Queries

SELECT * FROM
aws.ec2.describe_reserved_instances_listings;

Description

Describes your account's Reserved Instance listings in the Reserved Instance Marketplace.

The Reserved Instance Marketplace matches sellers who want to resell Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.

As a seller, you choose to list some or all of your Reserved Instances, and you specify the upfront price to receive for them. Your Reserved Instances are then listed in the Reserved Instance Marketplace and are available for purchase.

As a buyer, you specify the configuration of the Reserved Instance to purchase, and the Marketplace matches what you're searching for with what's available. The Marketplace first sells the lowest priced Reserved Instances to you, and continues to sell available Reserved Instance listings to you until your demand is met. You are charged based on the total price of all of the listings that you purchase.

For more information, see Sell in the Reserved Instance Marketplace 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
filters Input Column

One or more filters.

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

  • reserved-instances-listing-id - The ID of the Reserved Instances listing.

  • status - The status of the Reserved Instance listing (pending | active | cancelled | closed).

  • status-message - The reason for the status.

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[]
reserved_instances_id Input Column

One or more Reserved Instance IDs.

VARCHAR
reserved_instances_listing_id Input Column

One or more Reserved Instance listing IDs.

VARCHAR
_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_listings

Information about the Reserved Instance listing.

STRUCT(
"client_token" VARCHAR,
"create_date" TIMESTAMP_S,
"instance_counts" STRUCT(
"instance_count" BIGINT,
"state" VARCHAR
)[],
"price_schedules" STRUCT(
"active" BOOLEAN,
"currency_code" VARCHAR,
"price" DOUBLE,
"term" BIGINT
)[],
"reserved_instances_id" VARCHAR,
"reserved_instances_listing_id" VARCHAR,
"status" VARCHAR,
"status_message" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"update_date" TIMESTAMP_S
)[]
Show child fields
reserved_instances_listings[]
Show child fields
reserved_instances_listings[].client_token

A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see Ensuring Idempotency.

reserved_instances_listings[].create_date

The time the listing was created.

reserved_instances_listings[].instance_counts[]
Show child fields
reserved_instances_listings[].instance_counts[].instance_count

The number of listed Reserved Instances in the state specified by the state.

reserved_instances_listings[].instance_counts[].state

The states of the listed Reserved Instances.

reserved_instances_listings[].price_schedules[]
Show child fields
reserved_instances_listings[].price_schedules[].active

The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.

A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.

reserved_instances_listings[].price_schedules[].currency_code

The currency for transacting the Reserved Instance resale. At this time, the only supported currency is USD.

reserved_instances_listings[].price_schedules[].price

The fixed price for the term.

reserved_instances_listings[].price_schedules[].term

The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.

reserved_instances_listings[].reserved_instances_id

The ID of the Reserved Instance.

reserved_instances_listings[].reserved_instances_listing_id

The ID of the Reserved Instance listing.

reserved_instances_listings[].status

The status of the Reserved Instance listing.

reserved_instances_listings[].status_message

The reason for the current status of the Reserved Instance listing. The response can be blank.

reserved_instances_listings[].tags[]
Show child fields
reserved_instances_listings[].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_listings[].tags[].value

The value of the tag.

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

reserved_instances_listings[].update_date

The last modified timestamp of the listing.