Skip to main content

reserved_instances_listings

Creates, updates, deletes, gets or lists a reserved_instances_listings resource.

Overview

Namereserved_instances_listings
TypeResource
Idaws.ec2.reserved_instances_listings

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
client_tokenstringA unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see Ensuring Idempotency.
create_datestringThe time the listing was created.
instance_countsstringThe number of instances in this state.
price_schedulesstringThe price of the Reserved Instance listing.
reserved_instances_idstringThe ID of the Reserved Instance.
reserved_instances_listing_idstringThe ID of the Reserved Instance listing.
statusstringThe status of the Reserved Instance listing.
status_messagestringThe reason for the current status of the Reserved Instance listing. The response can be blank.
tagsstringAny tags assigned to the resource.
update_datestringThe last modified timestamp of the listing.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_reserved_instances_listingsselectregionReservedInstancesId, ReservedInstancesListingId, FilterDescribes 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.
create_reserved_instances_listinginsertReservedInstancesId, InstanceCount, PriceSchedules, ClientToken, regionCreates a listing for Amazon EC2 Standard Reserved Instances to be sold in the Reserved Instance Marketplace. You can submit one Standard Reserved Instance listing at a time. To get a list of your Standard Reserved Instances, you can use the DescribeReservedInstances operation. Only Standard Reserved Instances can be sold in the Reserved Instance Marketplace. Convertible Reserved Instances cannot be sold. The Reserved Instance Marketplace matches sellers who want to resell Standard 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. To sell your Standard Reserved Instances, you must first register as a seller in the Reserved Instance Marketplace. After completing the registration process, you can create a Reserved Instance Marketplace listing of some or all of your Standard Reserved Instances, and specify the upfront price to receive for them. Your Standard Reserved Instance listings then become available for purchase. To view the details of your Standard Reserved Instance listing, you can use the DescribeReservedInstancesListings operation. For more information, see Sell in the Reserved Instance Marketplace in the Amazon EC2 User Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
ClientTokenstringUnique, case-sensitive identifier you provide to ensure idempotency of your listings. This helps avoid duplicate listings. For more information, see Ensuring Idempotency.
InstanceCountintegerThe number of instances that are a part of a Reserved Instance account to be listed in the Reserved Instance Marketplace. This number should be less than or equal to the instance count associated with the Reserved Instance ID specified in this call.
PriceSchedulesarrayA list specifying the price of the Standard Reserved Instance for each month remaining in the Reserved Instance term.
ReservedInstancesIdstringThe ID of the active Standard Reserved Instance.
regionstringAWS region (default: us-east-1)
FilterarrayOne 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.
ReservedInstancesIdstringOne or more Reserved Instance IDs.
ReservedInstancesListingIdstringOne or more Reserved Instance listing IDs.

SELECT examples

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.

SELECT
client_token,
create_date,
instance_counts,
price_schedules,
reserved_instances_id,
reserved_instances_listing_id,
status,
status_message,
tags,
update_date
FROM aws.ec2.reserved_instances_listings
WHERE region = '{{ region }}' -- required
AND ReservedInstancesId = '{{ ReservedInstancesId }}'
AND ReservedInstancesListingId = '{{ ReservedInstancesListingId }}'
AND Filter = '{{ Filter }}'
;

INSERT examples

Creates a listing for Amazon EC2 Standard Reserved Instances to be sold in the Reserved Instance Marketplace. You can submit one Standard Reserved Instance listing at a time. To get a list of your Standard Reserved Instances, you can use the DescribeReservedInstances operation. Only Standard Reserved Instances can be sold in the Reserved Instance Marketplace. Convertible Reserved Instances cannot be sold. The Reserved Instance Marketplace matches sellers who want to resell Standard 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. To sell your Standard Reserved Instances, you must first register as a seller in the Reserved Instance Marketplace. After completing the registration process, you can create a Reserved Instance Marketplace listing of some or all of your Standard Reserved Instances, and specify the upfront price to receive for them. Your Standard Reserved Instance listings then become available for purchase. To view the details of your Standard Reserved Instance listing, you can use the DescribeReservedInstancesListings operation. For more information, see Sell in the Reserved Instance Marketplace in the Amazon EC2 User Guide.

INSERT INTO aws.ec2.reserved_instances_listings (
ReservedInstancesId,
InstanceCount,
PriceSchedules,
ClientToken,
region
)
SELECT
'{{ ReservedInstancesId }}',
'{{ InstanceCount }}',
'{{ PriceSchedules }}',
'{{ ClientToken }}',
'{{ region }}'
RETURNING
reserved_instances_listings
;