reserved_instances_listings
Creates, updates, deletes, gets or lists a reserved_instances_listings resource.
Overview
| Name | reserved_instances_listings |
| Type | Resource |
| Id | aws.ec2.reserved_instances_listings |
Fields
The following fields are returned by SELECT queries:
- describe_reserved_instances_listings
| Name | Datatype | Description |
|---|---|---|
client_token | string | A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see Ensuring Idempotency. |
create_date | string | The time the listing was created. |
instance_counts | string | The number of instances in this state. |
price_schedules | string | The price of the Reserved Instance listing. |
reserved_instances_id | string | The ID of the Reserved Instance. |
reserved_instances_listing_id | string | The ID of the Reserved Instance listing. |
status | string | The status of the Reserved Instance listing. |
status_message | string | The reason for the current status of the Reserved Instance listing. The response can be blank. |
tags | string | Any tags assigned to the resource. |
update_date | string | The last modified timestamp of the listing. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_reserved_instances_listings | select | region | ReservedInstancesId, ReservedInstancesListingId, Filter | 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. |
create_reserved_instances_listing | insert | ReservedInstancesId, InstanceCount, PriceSchedules, ClientToken, region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
ClientToken | string | Unique, case-sensitive identifier you provide to ensure idempotency of your listings. This helps avoid duplicate listings. For more information, see Ensuring Idempotency. |
InstanceCount | integer | The 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. |
PriceSchedules | array | A list specifying the price of the Standard Reserved Instance for each month remaining in the Reserved Instance term. |
ReservedInstancesId | string | The ID of the active Standard Reserved Instance. |
region | string | AWS region (default: us-east-1) |
Filter | array | 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. |
ReservedInstancesId | string | One or more Reserved Instance IDs. |
ReservedInstancesListingId | string | One or more Reserved Instance listing IDs. |
SELECT examples
- describe_reserved_instances_listings
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
- create_reserved_instances_listing
- Manifest
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
;
# Description fields are for documentation purposes
- name: reserved_instances_listings
props:
- name: ReservedInstancesId
value: "{{ ReservedInstancesId }}"
description: Required parameter for the reserved_instances_listings resource.
- name: InstanceCount
value: {{ InstanceCount }}
description: Required parameter for the reserved_instances_listings resource.
- name: PriceSchedules
value: "{{ PriceSchedules }}"
description: Required parameter for the reserved_instances_listings resource.
- name: ClientToken
value: "{{ ClientToken }}"
description: Required parameter for the reserved_instances_listings resource.
- name: region
value: "{{ region }}"
description: Required parameter for the reserved_instances_listings resource.