reserved_instances_offerings
Creates, updates, deletes, gets or lists a reserved_instances_offerings resource.
Overview
| Name | reserved_instances_offerings |
| Type | Resource |
| Id | aws.ec2.reserved_instances_offerings |
Fields
The following fields are returned by SELECT queries:
- describe_reserved_instances_offerings
| Name | Datatype | Description |
|---|---|---|
availability_zone | string | The Availability Zone in which the Reserved Instance can be used. |
availability_zone_id | string | The ID of the Availability Zone. |
currency_code | string | The currency of the Reserved Instance offering you are purchasing. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is USD. |
duration | integer | The duration of the Reserved Instance, in seconds. |
fixed_price | number | The purchase price of the Reserved Instance. |
instance_tenancy | string | The tenancy of the instance. |
instance_type | string | The instance type on which the Reserved Instance can be used. |
marketplace | boolean | Indicates whether the offering is available through the Reserved Instance Marketplace (resale) or Amazon Web Services. If it's a Reserved Instance Marketplace offering, this is true. |
offering_class | string | If convertible it can be exchanged for Reserved Instances of the same or higher monetary value, with different configurations. If standard, it is not possible to perform an exchange. |
offering_type | string | The Reserved Instance offering type. |
pricing_details | string | The pricing details of the Reserved Instance offering. |
product_description | string | The Reserved Instance product platform description. |
recurring_charges | string | The recurring charge tag assigned to the resource. |
reserved_instances_offering_id | string | The ID of the Reserved Instance offering. This is the offering ID used in GetReservedInstancesExchangeQuote to confirm that an exchange can be made. |
scope | string | Whether the Reserved Instance is applied to instances in a Region or an Availability Zone. |
usage_price | number | The usage price of the Reserved Instance, per hour. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_reserved_instances_offerings | select | region | AvailabilityZone, IncludeMarketplace, InstanceType, MaxDuration, MaxInstanceCount, MinDuration, OfferingClass, ProductDescription, ReservedInstancesOfferingId, AvailabilityZoneId, DryRun, Filter, InstanceTenancy, OfferingType, NextToken, MaxResults | Describes Reserved Instance offerings that are available for purchase. With Reserved Instances, you purchase the right to launch instances for a period of time. During that time period, you do not receive insufficient capacity errors, and you pay a lower usage rate than the rate charged for On-Demand instances for the actual time used. If you have listed your own Reserved Instances for sale in the Reserved Instance Marketplace, they will be excluded from these results. This is to ensure that you do not purchase your own Reserved Instances. 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. |
purchase_reserved_instances_offering | exec | InstanceCount, ReservedInstancesOfferingId, region | PurchaseTime, DryRun, LimitPrice | Purchases a Reserved Instance for use with your account. With Reserved Instances, you pay a lower hourly rate compared to On-Demand instance pricing. Use DescribeReservedInstancesOfferings to get a list of Reserved Instance offerings that match your specifications. After you've purchased a Reserved Instance, you can check for your new Reserved Instance with DescribeReservedInstances. To queue a purchase for a future date and time, specify a purchase time. If you do not specify a purchase time, the default is the current time. For more information, see Reserved Instances and 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 |
|---|---|---|
InstanceCount | integer | The number of Reserved Instances to purchase. |
ReservedInstancesOfferingId | string | The ID of the Reserved Instance offering to purchase. |
region | string | AWS region (default: us-east-1) |
AvailabilityZone | string | The Availability Zone in which the Reserved Instance can be used. Either AvailabilityZone or AvailabilityZoneId can be specified, but not both. |
AvailabilityZoneId | string | The ID of the Availability Zone. Either AvailabilityZone or AvailabilityZoneId can be specified, but not both. |
DryRun | boolean | 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. |
Filter | array | One or more filters. availability-zone - The Availability Zone where the Reserved Instance can be used. availability-zone-id - The ID of the Availability Zone where the Reserved Instance can be used. duration - The duration of the Reserved Instance (for example, one year or three years), in seconds (31536000 | 94608000). fixed-price - The purchase price of the Reserved Instance (for example, 9800.0). instance-type - The instance type that is covered by the reservation. marketplace - Set to true to show only Reserved Instance Marketplace offerings. When this filter is not used, which is the default behavior, all offerings from both Amazon Web Services and the Reserved Instance Marketplace are listed. 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-offering-id - The Reserved Instances offering ID. scope - The scope of the Reserved Instance (Availability Zone or Region). usage-price - The usage price of the Reserved Instance, per hour (for example, 0.84). |
IncludeMarketplace | boolean | Include Reserved Instance Marketplace offerings in the response. |
InstanceTenancy | string | The tenancy of the instances covered by the reservation. A Reserved Instance with a tenancy of dedicated is applied to instances that run in a VPC on single-tenant hardware (i.e., Dedicated Instances). Important: The host value cannot be used with this parameter. Use the default or dedicated values only. Default: default |
InstanceType | string | The instance type that the reservation will cover (for example, m1.small). For more information, see Amazon EC2 instance types in the Amazon EC2 User Guide. |
LimitPrice | object | Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices. |
MaxDuration | integer (int64) | The maximum duration (in seconds) to filter when searching for offerings. Default: 94608000 (3 years) |
MaxInstanceCount | integer | The maximum number of instances to filter when searching for offerings. Default: 20 |
MaxResults | integer | The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. The maximum is 100. Default: 100 |
MinDuration | integer (int64) | The minimum duration (in seconds) to filter when searching for offerings. Default: 2592000 (1 month) |
NextToken | string | The token to retrieve the next page of results. |
OfferingClass | string | The offering class of the Reserved Instance. Can be standard or convertible. |
OfferingType | string | 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. |
ProductDescription | string | The Reserved Instance product platform description. Instances that include (Amazon VPC) in the description are for use with Amazon VPC. |
PurchaseTime | string (date-time) | The time at which to purchase the Reserved Instance, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). |
ReservedInstancesOfferingId | array | One or more Reserved Instances offering IDs. |
SELECT examples
- describe_reserved_instances_offerings
Describes Reserved Instance offerings that are available for purchase. With Reserved Instances, you purchase the right to launch instances for a period of time. During that time period, you do not receive insufficient capacity errors, and you pay a lower usage rate than the rate charged for On-Demand instances for the actual time used. If you have listed your own Reserved Instances for sale in the Reserved Instance Marketplace, they will be excluded from these results. This is to ensure that you do not purchase your own Reserved Instances. 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
availability_zone,
availability_zone_id,
currency_code,
duration,
fixed_price,
instance_tenancy,
instance_type,
marketplace,
offering_class,
offering_type,
pricing_details,
product_description,
recurring_charges,
reserved_instances_offering_id,
scope,
usage_price
FROM aws.ec2.reserved_instances_offerings
WHERE region = '{{ region }}' -- required
AND AvailabilityZone = '{{ AvailabilityZone }}'
AND IncludeMarketplace = '{{ IncludeMarketplace }}'
AND InstanceType = '{{ InstanceType }}'
AND MaxDuration = '{{ MaxDuration }}'
AND MaxInstanceCount = '{{ MaxInstanceCount }}'
AND MinDuration = '{{ MinDuration }}'
AND OfferingClass = '{{ OfferingClass }}'
AND ProductDescription = '{{ ProductDescription }}'
AND ReservedInstancesOfferingId = '{{ ReservedInstancesOfferingId }}'
AND AvailabilityZoneId = '{{ AvailabilityZoneId }}'
AND DryRun = '{{ DryRun }}'
AND Filter = '{{ Filter }}'
AND InstanceTenancy = '{{ InstanceTenancy }}'
AND OfferingType = '{{ OfferingType }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
;
Lifecycle Methods
- purchase_reserved_instances_offering
Purchases a Reserved Instance for use with your account. With Reserved Instances, you pay a lower hourly rate compared to On-Demand instance pricing. Use DescribeReservedInstancesOfferings to get a list of Reserved Instance offerings that match your specifications. After you've purchased a Reserved Instance, you can check for your new Reserved Instance with DescribeReservedInstances. To queue a purchase for a future date and time, specify a purchase time. If you do not specify a purchase time, the default is the current time. For more information, see Reserved Instances and Sell in the Reserved Instance Marketplace in the Amazon EC2 User Guide.
EXEC aws.ec2.reserved_instances_offerings.purchase_reserved_instances_offering
@InstanceCount='{{ InstanceCount }}' --required,
@ReservedInstancesOfferingId='{{ ReservedInstancesOfferingId }}' --required,
@region='{{ region }}' --required,
@PurchaseTime='{{ PurchaseTime }}',
@DryRun={{ DryRun }},
@LimitPrice='{{ LimitPrice }}'
;